vscode-restclient icon indicating copy to clipboard operation
vscode-restclient copied to clipboard

REST client is not sending the Authorization headers for localhost url

Open RajaTheKing826 opened this issue 3 years ago • 5 comments

  • REST Client Version: v0.24.5
  • VSCode Version:1.59.1
  • OS Version:Ubuntu 20.04.1 LTS

Steps to Reproduce:

  1. deploy an api with serverless offline which should expect authorization header
  2. try to call the localhost url like http://localhost:3000/dev/endpoint with rest client , even though we have provided the authorization header it shows authorization undefined

I am getting this error for the localhost urls only and its working fine with other urls like urls which have been deployed to serverlesss

and the localhost urls are working fine with post man getting this issue is only with REST-client

RajaTheKing826 avatar Aug 31 '21 05:08 RajaTheKing826

Did you check to see if the headers are being changed to all lower case when you are testing for PascalCase or camelCase instead?

aidenberzins-olive avatar Oct 06 '21 17:10 aidenberzins-olive

@RajaTheKing826 could you please paste your request

Huachao avatar Oct 18 '21 02:10 Huachao

Hi

some times when I try to use encode user:pass to base64 feature, Authorization header is absent, when I manualy encode user:pass the Authorization tag is sent, after vscode restart it gets working!

if any log is useful please let me know.

REST Client Version: v0.25.0 VSCode Version: 1.72.0 OS: Linux x64 5.19.13-arch1-1

hmmftg avatar Oct 11 '22 07:10 hmmftg

REST Client Version: v0.25.1 Windows 10 VS Code 1.78.0

Authorization is not sending. I have been testing using Fiddler. The same POST cmd works fine in Postman Did notice that Host is not lower case. Is there some setting I am missing to make sure everything is lower case?

Example: GET https://gitlab.xxxx.com/api/v4/search?scope=projects&search=build

content-type: application/json
accept: application/json
authorization: bearer xxxxxxxx

littleccguy avatar Sep 08 '23 13:09 littleccguy

I guess I missed the fact there should be no lines between the URL and the header.

littleccguy avatar Sep 08 '23 18:09 littleccguy