Skip to content

Commit

Permalink
http docs only save non binary request
Browse files Browse the repository at this point in the history
  • Loading branch information
MykolaGolubyev committed Jun 21, 2018
1 parent 40ae725 commit 3a9c4a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void capture(String artifactName) {
requestHeader);
}

if (lastValidationResult.getRequestType() != null) {
if (lastValidationResult.getRequestType() != null && !lastValidationResult.isRequestBinary()) {
String fileName = "request." + fileExtensionForType(lastValidationResult.getRequestType());
FileUtils.writeTextContent(path.resolve(fileName),
prettyPrintContent(lastValidationResult.getRequestType(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ public String getRequestType() {
return requestBody != null ? requestBody.type() : null;
}

public boolean isRequestBinary() {
return requestBody != null && requestBody.isBinary();
}

public String getResponseType() {
return response.getContentType();
}
Expand Down

0 comments on commit 3a9c4a5

Please sign in to comment.