Skip to content

Commit

Permalink
fixes #74 The test cases generated for post, put and patch missing a …
Browse files Browse the repository at this point in the history
…header paramete
  • Loading branch information
stevehu committed Aug 25, 2017
1 parent 83c94d8 commit 2d5033c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import java.util.concurrent.atomic.AtomicReference;
final AtomicReference<ClientResponse> reference = new AtomicReference<>();
try {
ClientRequest request = new ClientRequest().setPath("/api/json").setMethod(Methods.POST);
request.getRequestHeaders().put(Headers.TRANSFER_ENCODING, "chunked");
connection.sendRequest(request, client.createClientCallback(reference, latch, "request body to be replaced"));
latch.await();
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public class @className {
try {
ClientRequest request = new ClientRequest().setPath("@path").setMethod(Methods.@httpMethod);
@if(hasBody) {
request.getRequestHeaders().put(Headers.TRANSFER_ENCODING, "chunked");
connection.sendRequest(request, client.createClientCallback(reference, latch, "request body to be replaced"));
} else {
connection.sendRequest(request, client.createClientCallback(reference, latch));
Expand Down

0 comments on commit 2d5033c

Please sign in to comment.