Skip to content

Allow setting headers using a Map with a subclass of CharSequence as the key type #1587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 19, 2018

Conversation

breun
Copy link
Contributor

@breun breun commented Oct 19, 2018

Currently this isn't supported:

Map<String, List<String>> headers = new HashMap<>();
headers.put("X-Forwarded-For", Colllections.singletonList("10.0.0.1"));

RequestBuilder requestBuilder = new RequestBuilder();
requestBuilder.setHeaders(headers);

My IDE reports: Cannot resolve method 'setHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>>)'

This pull requests adds support for the above construct.

@slandelle slandelle added this to the 2.5.5 milestone Oct 19, 2018
@slandelle slandelle merged commit e1f6371 into AsyncHttpClient:master Oct 19, 2018
@slandelle
Copy link
Contributor

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants