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

Handle compressed responses #282

Closed
karamazov1 opened this issue Oct 26, 2018 · 10 comments
Closed

Handle compressed responses #282

karamazov1 opened this issue Oct 26, 2018 · 10 comments
Labels

Comments

@karamazov1
Copy link

  • VSCode Version: 1.28.2
  • OS Version: Win 10
  • REST Client Version: 0.20.2

Does this extension handle compressed responses? When I tried, I get "The content type of response is application/json, while response body is not a valid json string"

@Huachao
Copy link
Owner

Huachao commented Oct 27, 2018

@karamazov1 Yes, it can handle, could you please provide the URL you're testing?

@karamazov1
Copy link
Author

@Huachao this is an internal api. I know it worked in the past but also know microsoft also enabled compression on their responses recently.

GET https://xxxxxxx.azure-api.net/product/products/213140 HTTP/1.1
Product-Subscription-Key: xxxxxxxxxxxxxxxxxxxxxxxxx
Host: xxxxxxxxxxx.azure-api.net
Accept-Encoding: gzip
Content-Type: application/json; charset=utf-8

@Huachao
Copy link
Owner

Huachao commented Oct 29, 2018

@can you confirm with other tools that the response is a valid JSON

@karamazov1
Copy link
Author

I tried this same request using postman and the proper json is rendered. Not sure what the difference could be, no differences at the request level that I can see.

Thanks for your responses, this is not critical by any means and I was just curious if compressed responses were handled as this same request was working before and I'm not sure if an extension update could be the culprit or a change on the back end endpoint broke my tests.

@Huachao
Copy link
Owner

Huachao commented Oct 30, 2018

What's the content encoding header of the response

@Huachao
Copy link
Owner

Huachao commented Oct 31, 2018

@karamazov1 thanks, I can repro this issue, I will fix it ASAP.

@Huachao
Copy link
Owner

Huachao commented Oct 31, 2018

@karamazov1 I have fixed the bug and will publish this fix in next release.

@Huachao Huachao closed this as completed Oct 31, 2018
@offero
Copy link

offero commented Oct 31, 2018

Just ran into this issue myself also. When is the next release?

@Huachao
Copy link
Owner

Huachao commented Nov 1, 2018

@karamazov1 @offero I have published the new release 0.20.3, and you can try the new version to verify

@karamazov1
Copy link
Author

This is working for me now. Thanks!

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

3 participants