Fiddler, of course, rocks!
So I need to build my request (some headers, a big xml payload), and do an http POST that is gzipped (header indicates gzip compression, and the xml payload I paste in gets gzipped... just like the specs say).
How?
When I use the "Rules" option to gzip, the request appears (as far as I can see) not to be modified. Appears the same as if not gzipped.
Currently using fiddler 2.3.9.2
CURL Reference: The desired goal in fiddler can be done in curl with a couple of steps:
1) gzip payload.xml (use 7-Zip or other tool that can create a gzip file). Call the file: payload.xml.gz
2) Use this syntax
curl --header "Content-Type: application/xml" --header "Content-Encoding: gzip" --data-binary "@payload.xml.gz" https://<yourendpoint> --insecure --trace-ascii -
TIA!
First, please upgrade to the current version of Fiddler.
Second, it's important to understand that most of Fiddler's visible compression features relate to the compression of the response rather than of the request. That's because many/most servers don't support compression of requests because browsers don't have any way to know a priori whether it will be supported and hence browsers don't compress requests. Similarly, supporting compressed requests opens the server up to ZIP-bomb attacks.
Now, having said that, some servers do support compressed requests, and Fiddler can generate these. The first question is "How are you generating your request?"
If you're using the Composer, do this: Click Rules > Customize Rules. Scroll to OnBeforeRequest. Add the following lines:
Now, any request that contains a Content-Encoding: doGZIP header will be automatically compressed by Fiddler before being transmitted to the server.