10-25-2023 03:15 PM
I have a LabView program that performs an HTTP post to retrieve data. I am running this on three different test environments. On two of the environments the response is in plain text. However, on one of the environments the response appears to be in some type of compressed format (see attached image). When I execute the exact same HTTP Post via Postman in this environment (same curl and header info) the response is in plain text. Any idea what might be going on?
10-25-2023 05:32 PM
Works on two, not on one. Seems to me there's something wrong with the configuration of the one that is different. Since I you've supplied scant detail, I can't really make a more detailed reply.
10-26-2023 01:25 PM
I looked at the response header info for the Post and it seems that for the environment giving the special characters the content encoding is set to gzip. For the two environments where I get plain text it is not. Is there a LabView VI for decompressing gzip data?
10-26-2023 04:58 PM
@JHess wrote:
Is there a LabView VI for decompressing gzip data?
I haven't tried it but there is this:
https://forums.ni.com/t5/Example-Code/GZIP-compress-uncompress-of-string-using-NET/ta-p/3507908
10-27-2023 03:40 AM - edited 10-27-2023 03:43 AM
@JHess wrote:
When I execute the exact same HTTP Post via Postman in this environment (same curl and header info) the response is in plain text. Any idea what might be going on?
There might be some communication negotiation going on before the send\receive.
HTTP Content Negotiation in REST APIs (restfulapi.net)
Postman might negotiate to not get compressed data, or simply decompress data automatically.
10-27-2023 07:03 AM
Thanks so much for your help!!! The gzip decompress VI works perfectly.