I am having a problem. It deals with a web service using POST method with cURL. I am trying to compress the request with GZIP,DEFLATE. If you look on line three this is how it was done.
$x = curl_init("http://url");
curl_setopt($x, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
**curl_setopt($x, CURLOPT_ENCODING, 'Accept-Encoding: gzip,deflate');**
curl_setopt($x, CURLOPT_POST, 1);
curl_setopt($x, CURLOPT_POSTFIELDS, $inputdata);
curl_setopt($x, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($x, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($x);
I get a response HTTP/1.1 200 OK Date: Mon, 22 Oct 2012 16:19:23 GMT Server: Resin/1.11.14 Content-Type: text/xml; charset=UTF-8 Vary: Accept-Encoding Content-Encoding: gzip Content-Length: 2088
However, The web service provider says that it is not compressed. What am I doing wrong?