0

The 'url' is API that should returns gzip 19+MB

this.httpClient.get(url).subscribe(data => console.log(data))
// -> data is 'null'

I tried to add responseType: 'text' then the result is empty string The Mozzila client said

type: gzip
transfered: 19.47MB
size: 0 B

request headers

Host: //hidden
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0
Accept: application/json, text/plain, */*
Accept-Language: en
Accept-Encoding: gzip, deflate, br
Authorization: bearer //hidden
Origin: http://localhost:4200
Connection: keep-alive
Referer: http://localhost:4200/pages/home
Pragma: no-cache
Cache-Control: no-cache

Response Headers:

HTTP/1.1 200 
Content-Type: application/zip
Content-Length: 20417373
Connection: keep-alive
Content-Encoding: gzip
Content-Disposition: attachment; filename="tfmd_archive_2020-10-05.czml.gz"
Accept-Ranges: bytes
Date: Wed, 07 Oct 2020 09:28:44 GMT
Access-Control-Allow-Origin: http://localhost:4200
Vary: Origin
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Authorization,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
X-Kong-Upstream-Latency: 14
X-Kong-Proxy-Latency: 12
Via: kong/2.0.0

When try by POSTMAN I receive all the data successfully and everythink work fine. Maybe there is the problem with angular code ? How can I access the data ?

0 Answers0