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) {
|
private Body parseBody(PostmanRequest requestDesc, Request request) {
|
||||||
Body body = new Body();
|
Body body = new Body();
|
||||||
JSONObject postmanBody = requestDesc.getBody();
|
JSONObject postmanBody = requestDesc.getBody();
|
||||||
|
if (postmanBody == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
String bodyMode = postmanBody.getString("mode");
|
String bodyMode = postmanBody.getString("mode");
|
||||||
if (StringUtils.equals(bodyMode, PostmanRequestBodyMode.RAW.value())) {
|
if (StringUtils.equals(bodyMode, PostmanRequestBodyMode.RAW.value())) {
|
||||||
body.setRaw(postmanBody.getString(bodyMode));
|
body.setRaw(postmanBody.getString(bodyMode));
|
||||||
|
|
Loading…
Reference in New Issue