AnWeber / vscode-httpyac

Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT and WebSocket requests directly within Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=anweber.vscode-httpyac
MIT License
222 stars 20 forks source link

Is it possible to make defaultHeaders mutable? #200

Closed AnWeber closed 1 year ago

AnWeber commented 1 year ago

Discussed in https://github.com/AnWeber/vscode-httpyac/discussions/199

Originally posted by **beva-sdev** June 9, 2023 Dear all, the API I need to test has in 90% cases headers in form: - Authorization: Bearer {{token}} - Content-Type: application/json Just the get Token (the first request) and revoke token (the lastrequest) are using: - Authorization: Basic user:pw - Content-Type: application/x-www-form-urlencoded Did following: 1) set the defaultHeaders in VS-Code setting.json for the 90% of requests 2) for request with another another requirements I have specified the header in the request Block. Problem: the per request headers doesnt overwrite the default ones. It seems the defaultHeaders are immutable. Do we have any solution/workaround? Thanks in advance
AnWeber commented 1 year ago

Behavior can be produced with different case of the headers. These must be taken into account when overwriting.