-
Notifications
You must be signed in to change notification settings - Fork 12
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
Content-Type header not recognized in vsc.utils.rest_oauth #62
Comments
That seems odd. It should have a hyphen: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type |
@wpoely86 You're right, but the code as it is now, does not seem to work. But that's probably due to some other issue (which I haven't found just yet). In fact, commenting out that one line in request_access_token makes it work again. |
@backelj where do you get an error? |
This |
@stdweird I was just calling request_access_token from a test script... The error I get is: File "[...]/vsc/utils/rest_oauth.py", line 45, in request_access_token As said, commenting out the Content-Type line in request_access_token makes it work. |
ok, looks like an error. afaik, we always use curl to fetch a new token and do not specify the content type, so i guess the json content type is not supported with this url. feel free to make a PR to remove the line |
Hi,
I was checking the function request_access_token from vsc.utils.rest_oauth, but it fails to work because of the line:
request.add_header('Content-Type', 'application/json')
It looks like this has to be written without the hyphen:
request.add_header('ContentType', 'application/json')
Can someone confirm this?
-- Thanks,
Franky
The text was updated successfully, but these errors were encountered: