interceptors icon indicating copy to clipboard operation
interceptors copied to clipboard

Header keys for requests are being converted to lowercase

Open mdesousa opened this issue 1 year ago • 0 comments

Hi, thanks for this great library!

We had a question about the behavior for intercepted requests. We noticed that the header keys are being converted to lowercase, but we didn't make any changes to them in our interceptors. Is this something that is expected? We are initializing the interceptor as shown below, and the request interceptor is just logging the request without touching it. On the receiving end, we are noticing that the header keys are now lowercase. Thanks.

  const interceptor = new BatchInterceptor({
    name: 'my-interceptor',
    interceptors: [
      new ClientRequestInterceptor(),
      new XMLHttpRequestInterceptor(),
      new FetchInterceptor(),
    ],
  });
  interceptor.apply();

mdesousa avatar Feb 02 '24 18:02 mdesousa