Curl and gzip

ENVIRONMENT: Win 10 and FMP 21.

DISCUSSION: I’m attempting to use “Insert from URL” and curl to download a text file. The response header indicates the associated web page(s) and text file are compressed with gzip.

RESULT: The script is downloading the html for a web page and not the desired text file.

QUESTION: Will the “Insert from URL” script step and curl automatically decompress the data?

For MBS FileMaker Plugin, you would need to use MBS( "CURL.SetOptionAcceptEncoding"; $curl; "gzip" ) to enable automatic decompression of HTTP downloads.

Insert From URL may have a similar option.

1 Like

The FileMaker cURL interface automatically decompresses server responses with gzip. From a performance perspective, this makes a lot of sense for larger data sizes exceeding 2000 KB, as the compression process is very fast.