Skip to content

Ability to replace all headers when passing in headers map #419

@haroon-sheikh

Description

@haroon-sheikh

**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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions