LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Appears Compressed in HTTP Rest Post Response

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?

 

 

image.png

0 Kudos
Message 1 of 6
(555 Views)

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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 6
(524 Views)

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?

0 Kudos
Message 3 of 6
(471 Views)

@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

 

Message 4 of 6
(463 Views)

@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)

HTTP compression - Wikipedia

 

Postman might negotiate to not get compressed data, or simply decompress data automatically.

0 Kudos
Message 5 of 6
(448 Views)

Thanks so much for your help!!!  The gzip decompress VI works perfectly.  

0 Kudos
Message 6 of 6
(434 Views)