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

Curl command fails if -u is specified #26

Closed
gpasq opened this issue Jul 31, 2016 · 2 comments
Closed

Curl command fails if -u is specified #26

gpasq opened this issue Jul 31, 2016 · 2 comments
Labels

Comments

@gpasq
Copy link

gpasq commented Jul 31, 2016

  • VSCode Version: 1.3.1
  • OS Version: Windows 10
  • REST Client Version: 0.6.2

Steps to Reproduce:

  1. Create a curl command that passes the -u flag with required parameters
  2. run the curl, it will fail with "Unauthorized"

It appears that running the curl command does not process the -u parameters correctly. You can reproduce this if you sign up for a twilio account and call:

curl "https://lookups.twilio.com/v1/PhoneNumbers/+19999999999?CountryCode=US&Type=carrier" -u 'account-SID:account-token'

Response is

HTTP/1.1 401 UNAUTHORIZED 317ms
access-control-allow-credentials: true
access-control-allow-headers: Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since
access-control-allow-methods: GET, POST, DELETE, OPTIONS
access-control-allow-origin: *
access-control-expose-headers: ETag
content-type: application/json
date: Sun, 31 Jul 2016 02:54:20 GMT
twilio-request-duration: 0.002
twilio-request-id: RQb1fa69f4011d45f1bd552952a270a886
www-authenticate: Basic realm="Twilio API"
x-powered-by: AT-5000
x-shenanigans: none
content-length: 205
connection: Close

{
    "code": 20003,
    "detail": "Your AccountSid or AuthToken was incorrect.",
    "message": "Authentication Error - No credentials provided",
    "more_info": "https://www.twilio.com/docs/errors/20003",
    "status": 401
}
@Huachao Huachao added the bug label Aug 1, 2016
@Huachao Huachao closed this as completed in d9f47b0 Aug 1, 2016
@Huachao
Copy link
Owner

Huachao commented Aug 1, 2016

@gpasq, I have fixed in latest version 0.6.3, please help to verify

@gpasq
Copy link
Author

gpasq commented Aug 1, 2016

That has fixed it @Huachao, thank you!

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