Re: Howto question - SOAP on the command line
Date: Tue, 19 Apr 2005 22:48:11 +0200 (CEST)
On Tue, 19 Apr 2005, Dan White wrote:
> I would like to use curl (on a command line/in a script) to do the
> equivalent of this wget command :
> wget --http-user='username' --http-passwd='password' --post-file='soap.xml'
Without being a wget wizard, I would say that the curl equivalent would be:
curl -u username:password -d @soap.xml --compressed -o outputFile
This would ask for a compressed response and automatically unpack it on
retrieval and store the uncompressed version in the given output file
(assuming curl was built with libz support enabled).
People that sends XML often wants to change content-type as well, like -H
Note that this makes a POST and it sends the file "raw" with no encoding done
what so ever.
Append --trace-ascii to see exactly what curl sends and receives.
> Or should I just go straight to the library ?
I recommend smoothing it out with the curl tool first, but that's mostly a
matter of taste.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2005-04-19