HttpClient: Remove default headers for a single request

We are using aurelia-http-client (NOT the fetch client) with some default configured headers by using configure(config => config.withHeader(name, value)).

Is there any way to remove these headers for a single request?

I know specific requests can be created with createRequest(url) and this does provide ways to override default parametrs (e.g. withBaseUrl(newBaseUrl)), but I cannot seem to find an API to do so with headers.

EDIT: Our approach seems to have other problems so we do not need further input, but I will leave this open if anyone else needs it.

1 Like