I am trying to send a post request based on the website's document as shown below: POST /WindchillQualitySolutions11.0/DataEngine.asmx/GetSessionToken HTTP/1.1 Host: vm-test Content-Type: application/x-www-form-urlencoded Content-Length: length
UserName=Bill&Password=passwd&GroupName=Manager&SecondsValid=0
The internal website address is something like : http://itdabcSomeNumber/ptcwindchillqualitysolutions11.0/
The curl command I tried:
curl -H 'Host:itdabcSomeNumber' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Content-Length: length' -d 'UserName=myUserName&Password=MyPassWord&GroupName=Manager&SecondsValid=0' http://itdabcSomeNumber/WindchillQualitySolutions11.0/DataEngine.asmx/GetUserGroup
I got the following error: curl: (6) Could not resolve host: application curl: (6) Could not resolve host: length' 'Password' is not recognized as an internal or external command, operable program or batch file. 'GroupName' is not recognized as an internal or external command, operable program or batch file. 'SecondsValid' is not recognized as an internal or external command, operable program or batch file.
I also tried -H for username and password, it does not work either. Could anyone please tell me the correct command to send the request.