microsoft / typed-rest-client

Node Rest and Http Clients with typings for use with TypeScript
Other
675 stars 118 forks source link

Fetching GZipped content is not supported #148

Closed strefethen closed 4 years ago

strefethen commented 5 years ago
  1. Please check our current Issues to see if someone already reported this https://github.com/Microsoft/typed-rest-client/issues

Done.

  1. Take a look at our Instructions for logging issues https://github.com/Microsoft/typed-rest-client/blob/master/CONTRIBUTING.md#instructions-for-logging-issues

Environment

Node version: v8.7.0 Npm version: v6.7.0 OS and version: OSX v10.13.6 typed-rest-client version: 1.4.0

Issue Description

Making a request to a gzipped resource fails to decode the content properly.

Expected behaviour

Gzipped endpoints can be fetched and decoded properly.

Actual behaviour

Gzip support isn't implemented.

Steps to reproduce

  1. Add a new GET mocha test to fetching http://httpbin.org/gzip
  2. Modify the test to look for headers.Host within the response ("url" is not included in /gzip endpoint).
  3. Run the included tests: npm run build && npm test Notice the test fails.
strefethen commented 5 years ago

I've started a PR but prior to completing it I need to get my employers approval for submissions to this repo. :| I'll circle back once that's complete.

https://github.com/microsoft/typed-rest-client/pull/149

hamzahejja commented 4 years ago

@damccorm I have picked up this issue, PR #189 Just delivered to integrate a solution.