4

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

mikej
  • 63,686
  • 16
  • 149
  • 130

2 Answers2

8

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"
mikej
  • 63,686
  • 16
  • 149
  • 130
3

Also using double quotes inside the quotes:

--post-data="big long string with ""quotes"" in it"
vilman
  • 31
  • 1