Hi guys, I noticed that when Pact mock service sen...
# pact-net
d
Hi guys, I noticed that when Pact mock service sends a request to Provider from a given contract it doesn't preserve Http Headers case. For instance, in a contract I have the following request headers:
Copy code
"interactions": [
    {
      "description": "A GET request with custom headers",
      "request": {
        "method": "GET",
        "path": "/api/provider",
        "headers": {
          "Content-Type": "application/json",
          "TestHeaderKey": "TestHeaderValue"
        }
      },
...
But my Provider receives them in lowercase. Is is possible to somehow make it case preserving?
u
Unfortunately, the underlying HTTP implementation is doing that, because lower case headers are required for HTTP2 and HTTP3. With HTTP 1 and 1.1, headers are case insensitive so things should still work with the lowercase names.
d
Thank you for the answer