-
Notifications
You must be signed in to change notification settings - Fork 481
Server side requests using HttpClient don't support GZIP encoding #1055
Comments
Part of the issue is that our Web API for some reason occasionally ignored the Accept-Encoding header and just delivered gzipped content (with proper Content-Encoding) anyway. So, to have XHRHttpRequests work like they do in the browser, I think we need to support the GZIP and I think in general it would be a good thing to support it really. |
Related: pwnall/node-xhr2#17 |
Issue will be tracked exclusively in node-xhr2. We can upgrade to the newer version when it's published; when this happens, please open an issue on angular/angular since that's where the dependency lives. |
@destructive-dragon : I am facing the same issue here. How to solve this? same angular version here as well |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm trying to request some API using the
HttpClient
on myapp.server.module.ts
.if I use
responseType: 'text'
then it works although the data is still gzipped and I can't parse it as json. Otherwise I get this error:The same code works flawlessly on the browser.
Angular version: 6.1.3
Node.js version: 9.2.0
Motivation: I want to request translation files from our API and render them for SEO purposes.
The text was updated successfully, but these errors were encountered: