Skip to content

Commit

Permalink
[Java][RESTEasy] Fixed setting of custom headers (#599)
Browse files Browse the repository at this point in the history
Fixed header generation. Previously the key was used as value parameter.
  • Loading branch information
MarvGilb authored and jmini committed Jul 19, 2018
1 parent 76160b5 commit 52cd17e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ public class ApiClient {

for (Entry<String, String> defaultHeaderEnrty: defaultHeaderMap.entrySet()) {
if (!headerParams.containsKey(defaultHeaderEnrty.getKey())) {
String value = defaultHeaderEnrty.getKey();
String value = defaultHeaderEnrty.getValue();
if (value != null) {
invocationBuilder = invocationBuilder.header(defaultHeaderEnrty.getKey(), value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ public <T> T invokeAPI(String path, String method, List<Pair> queryParams, Objec

for (Entry<String, String> defaultHeaderEnrty: defaultHeaderMap.entrySet()) {
if (!headerParams.containsKey(defaultHeaderEnrty.getKey())) {
String value = defaultHeaderEnrty.getKey();
String value = defaultHeaderEnrty.getValue();
if (value != null) {
invocationBuilder = invocationBuilder.header(defaultHeaderEnrty.getKey(), value);
}
Expand Down

0 comments on commit 52cd17e

Please sign in to comment.