Question

I'm using wget for Windows and I want to specify a --post-data filter (and avoid using a --post-file filter) but I'm struggling to get it to work. It might be because there are strings within double quote marks like this :

wget "http://www.somesite.com/wfs" --header="Content-Type: text/xml; charset=UTF-8"
--user=username --password=password --no-check-certificate
--post-data="big long string with "quotes" in it" --output-document=C:\Test.xml

Has anyone else successfully got --post-data to work in wget for Windows? Am I missing something?

Cheers

Andy

Was it helpful?

Solution

You can escape the quotes in your big long string by prefixing them with \ e.g.

--post-data="big long string with \"quotes\" in it"

OTHER TIPS

Also using double quotes inside the quotes:

--post-data="big long string with ""quotes"" in it"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top