Skip to content

Commit

Permalink
feat(query): Add request options to search/read methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ElPicador committed Jul 28, 2017
1 parent b146b88 commit 3750169
Show file tree
Hide file tree
Showing 13 changed files with 1,746 additions and 207 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ protected AlgoliaHttpResponse request(@Nonnull AlgoliaHttpRequest request) throw
}

private AlgoliaHttpResponse from(final HTTPResponse httpResponse) {


return new AlgoliaHttpResponse() {
@Override
public int getStatusCode() {
Expand Down Expand Up @@ -95,6 +93,10 @@ protected HTTPRequest build(AlgoliaHttpRequest request) throws MalformedURLExcep
httpRequest.addHeader(new HTTPHeader(entry.getKey(), entry.getValue()));
}

for (Map.Entry<String, String> entry : request.getHeaders().entrySet()) {
httpRequest.addHeader(new HTTPHeader(entry.getKey(), entry.getValue()));
}

if (request.hasContent()) {
httpRequest.setPayload(request.getContent().getBytes());
}
Expand Down
Loading

0 comments on commit 3750169

Please sign in to comment.