Using codeless in this regard is analogous to using
curl as is, i.e. without passing the result to
gunzip tool. You can easily check that by issuing the same request with curl but without piping to gunzip:
curl -X GET "https://www.parsehub.com/api/v2/runs/tyJ_5hLgFGc9/data?api_key=tZ03ETywobZP"
…and you get the same zipped response as you do in Codeless.
So in order for this to work you’ll need something an “unzipper” like
gunzip in your code, which means you’ll need to implement
gunzip with your code. Our service does not provide such functionality, and neither does HTTP itself.
The problem in your case is that the ParseHub endpoint returns a zipped response by default, and to solve this you’ll need to find out a way to ask it for a non-zipped response.
Accept-Encoding header wouldn’t help in this regard, since it merely informs the remote server about the format your client can handle. It does not implement the actual decoding. You can check it by issuing the same
curl request with this header, it still returns the encoded data:
curl -X GET -H Accept-Encoding:gzip "https://www.parsehub.com/api/v2/runs/tyJ_5hLgFGc9/data?api_key=tZ03ETywobZP"