Import Mapping can fail with gzipd application/json content type, yet work when uncompressed

0
Is a published REST API import mapping supposed to be able to handle gzip’d application/json content type? I have an API that works if the content is not gzip’d and fails if it is. The source of the request is not under my control. However, I have a couple other services which also receive the same content. They are implemented in different technologies that handle the content without any special treatment, for example NodeJS/Express. The import mapping JSON handler blows up trying to deserialize the content complaining of improper whitespace between tokens, [char code 31] when the body is gzip’d.
asked
1 answers
0

I’d be surprised if Mendix cannot handle GZIP compression.

However if you want to disable any type of compession, try adding the http header “Accept-Encoding : identity” to the rest call. This basically tells the webserver that you want an uncompressed response.

answered