Currently we're able to run .headerReplace() for a single header but not a map of headers.
As part of our requests, we pass in a headers map which sometimes may include the default headers but with Unirest.get(...).headers(map), it would just append to default headers. We would like to replace the default headers if the map contains it.
Describe the solution you'd like
Unirest.get("").headersReplace(headersMap); which internally calls .headerReplace(...) for each item.
I'm happy to submit a PR if you're happy with the proposed solution.
**Is your feature request related to a problem?
Currently we're able to run .headerReplace() for a single header but not a map of headers.
As part of our requests, we pass in a headers map which sometimes may include the default headers but with
Unirest.get(...).headers(map)
, it would just append to default headers. We would like to replace the default headers if the map contains it.Describe the solution you'd like
Unirest.get("").headersReplace(headersMap);
which internally calls.headerReplace(...)
for each item.I'm happy to submit a PR if you're happy with the proposed solution.