Thursday, September 11, 2014

HTTP POST into a form from curl

I want to post some data from file.txt into a form on the website. Curl can do it from command line:
curl -X POST -d @filename.txt -u usernamehere:passwordhere https://server.company.com/session/sync.jsp
The content of filename.txt is pairs of name=value separated by &. E.g.
id=1&options=doit&field3=Submit

No comments: