Hi!
I have a toe where open data was used succesfully last winter. Now the provider of the data demands use of HTTP compression. On their site they tell to include Accept-Encoding: gzip to header in request. I have done this by adding table with required text and connecting it to input 0 of Webclient DAT. As you can see from the screenshot I get the 200 status code meaning its OK. But I can’t see the data. So is there some kind of problem that the Webclient doesnt unzip the gzip data?
Because it is compressed and the webclientDAT is not taking care of that for you, which is fine. You will have to use the callbacks to decompress your data using gzip
Create a simple textDAT (named output_text) and write the following into your callbacks
import gzip
def onResponse(webClientDAT, statusCode, headerDict, data):
uncompressed_data = gzip.decompress( data )
op('output_text').text = uncompressed_data.decode( 'utf-8' )
return
This is not tested but should work based on what I see.