c# - Wget and .net WebAPI -


i created simple restless webapi takes few variables , returns simple success or fail

this works great in fiddler.

http://www.####.com/myapi/api/settingsconfig post http/1.1

request headers

user-agent: fiddler

host: www.######.com

content-length: 143

content-type: application/x-www-form-urlencoded; charset=utf-8

request body

pbxnumber=6461111111&username=me&password=you&enable=true

my client wants use wget post webapi:

he tried:

wget.exe https://www.####.com/myapi/api/settingsconfig --post-data 'pbxnumber=6461111111&username=mew&password=you&enable=true'

and gets

'username' not recognized internal or external command, operable program or batch file. 'password' not recognized internal or external command, operable program or batch file. 'enable' not recognized internal or external command, operable program or batch file.

please tell me @ lost do!

the ampersands & special characters in bash shell. need escape them backslash:

wget.exe https://www.####.com/myapi/api/settingsconfig --post-data 'pbxnumber=6461111111\&username=mew\&password=you\&enable=true' 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -