Wget for Windows - using --post data with quotes

I use wget for Windows and I want to specify a filter --post-data(and not use a filter --post-file), but I'm struggling to get it working. Perhaps this is because there are lines in double quotes:

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 gotten --post-datato work on wget for windows? Did I miss something?

Greetings

Andy

+3
source share
2 answers

You can avoid quotes in a large long string by prefixing them with \ eg

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

Also using double quotes inside quotes:

--post-data="big long string with ""quotes"" in it"
+3
source

Source: https://habr.com/ru/post/1714476/


All Articles