The request should be sent with accept: application/json.
Current Behavior
I see the following with DEBUG=superface:http:sensitive env:
In case I name the header in the map as accept (lowercase a), I don't see it in the debug output at all.
Possible Solution
Note that this could be an issue with debug output, I didn't test what header actually reaches the endpoint in the end.
The current implementation of the interpreter collects expected response types and passes them to the request. If any of the response handlers is missing a response type, */* is set instead. It is likely that somewhere down the line, the passed-in accept parameter overrides the user-provider header.
Given the following http request:
Expected Behavior
The request should be sent with
accept: application/json
.Current Behavior
I see the following with
DEBUG=superface:http:sensitive
env:In case I name the header in the map as
accept
(lowercase a), I don't see it in the debug output at all.Possible Solution
Note that this could be an issue with debug output, I didn't test what header actually reaches the endpoint in the end.
The current implementation of the interpreter collects expected response types and passes them to the request. If any of the response handlers is missing a response type,
*/*
is set instead. It is likely that somewhere down the line, the passed-inaccept
parameter overrides the user-provider header.Your Environment
@superfaceai/one-sdk
1.5.0
v16.15.0