You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/05/28 15:56:12 UTC

[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request #4243: Add support for passing headers in pinot client

mcvsubbu commented on a change in pull request #4243: Add support for passing headers in pinot client
URL: https://github.com/apache/incubator-pinot/pull/4243#discussion_r288178359
 
 

 ##########
 File path: pinot-api/src/main/java/org/apache/pinot/client/JsonAsyncHttpPinotClientTransport.java
 ##########
 @@ -58,7 +65,13 @@ public BrokerResponse executeQuery(String brokerAddress, String query)
 
       final String url = "http://" + brokerAddress + "/query";
 
-      final Future<Response> response = _httpClient.preparePost(url)
+      AsyncHttpClient.BoundRequestBuilder request = _httpClient.preparePost(url);
+
+      if(_headers != null) {
+        _headers.forEach( (k,v) -> request.addHeader(k, v));
 
 Review comment:
   nit: please remove the extra space bet "(" and add a space after "k,"

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org