fix: postman 导入GET请求报错
This commit is contained in:
parent
cc7c5b9e23
commit
43f9f190f7
|
@ -80,6 +80,9 @@ public class PostmanParser extends ApiImportAbstractParser {
|
|||
private Body parseBody(PostmanRequest requestDesc, Request request) {
|
||||
Body body = new Body();
|
||||
JSONObject postmanBody = requestDesc.getBody();
|
||||
if (postmanBody == null) {
|
||||
return null;
|
||||
}
|
||||
String bodyMode = postmanBody.getString("mode");
|
||||
if (StringUtils.equals(bodyMode, PostmanRequestBodyMode.RAW.value())) {
|
||||
body.setRaw(postmanBody.getString(bodyMode));
|
||||
|
|
Loading…
Reference in New Issue