Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Generate code snippet" does not encode basic authorization #98

Closed
codeborn opened this issue May 22, 2017 · 3 comments
Closed

"Generate code snippet" does not encode basic authorization #98

codeborn opened this issue May 22, 2017 · 3 comments
Labels

Comments

@codeborn
Copy link

  • VSCode Version: 1.12.2
  • OS Version: Mac OS X 10.11.6
  • REST Client Version: 0.14.4

Steps to Reproduce:

  1. Create a file auth.http:
    GET https://example.com/api/some/endpoint
    Authorization: Basic my-user my-password

  2. Right-click and select "Generate code snippet". Select "Shell" and then "cUrl".

Result:
curl --request GET
--url https://example.com/api/some/endpoint
--header 'authorization: Basic my-user my-password'

Expected result:
curl --request GET
--url https://example.com/api/some/endpoint
--header 'authorization: Basic bXktdXNlcjpteS1wYXNzd29yZA=='

That is, with the basic authorization replaced with a base64 encoded representation, like what you would get when sending the request directly from the extension.

Anyway, thanks for creating the best HTTP-client for VSCode (that I have found this far ;) )!

@Huachao Huachao added the bug label May 22, 2017
@Huachao
Copy link
Owner

Huachao commented May 23, 2017

@codeborn I have fixed this issue, and will publish it in next release ASAP

@Huachao
Copy link
Owner

Huachao commented Jun 14, 2017

@codeborn you can try the latest version 0.14.5 to verify, sorry for the late

@codeborn
Copy link
Author

Works great now! Thanks!

However, I just noticed that when using POST the body data is not included. I will file a separate issue regarding that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants