thunder-client-support icon indicating copy to clipboard operation
thunder-client-support copied to clipboard

Collection headers do not override automatically created Request headers

Open shawnpyle opened this issue 2 years ago • 1 comments

Describe the bug Headers set in collection do not override default, automatically generated header values for requests.

To Reproduce

  1. Create a collection with a header Accept with value application/json. image
  2. Create a new request inside the collection. Default headers Accept and User-Agent are automatically created for the request. image
  3. Run request and the Accept header sent are not overridden by the Collection settings. image
  4. Removing the automatically created Accept header on the Request does work as expected. image
  5. Closing the request and reopening the request re-adds the automatic Accept header.

Expected behavior

I would have expected either

  1. manually removing automatically created Request headers to not re-appear or
  2. Collection settings to override default request headers.

Number 1 would be my preference.

Another solution might be to provide an option in the Extension or Collection to not automatically create headers on requests.

Platform:

  • OS:
$> uname -a
Darwin MacBook-Pro.lan 21.6.0 Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:25 PDT 2022; root:xnu-8020.140.41~1/RELEASE_X86_64 x86_64
  • vscode version:
$> code --version
1.71.0
784b0177c56c607789f9638da7b6bf3230d47a8c
x64
  • extension version: 1.19.2

shawnpyle avatar Sep 21 '22 16:09 shawnpyle

Thanks @shawnpyle for reporting the issue, will look into it.

rangav avatar Sep 21 '22 19:09 rangav

This bug is fixed now and published to marketplace, please update to v1.19.3

See all features released https://github.com/rangav/thunder-client-support/releases/tag/v1.19.3

Please let me know your feedback.

rangav avatar Sep 26 '22 03:09 rangav