Kamis, 17 Januari 2019

How to post data with curl command line

  Tidak ada komentar
Curl post text from file
[[email protected] ~]$ curl -X POST -d @mypost.txt http://myserver.com/index.php/json
Curl post xml from file


[[email protected] ~]$ curl -X POST -d @reqbil.xml 192.168.10.100:8080/My_Service 
Curl post text from file with specific http version protocol
[[email protected] ~]$ curl -X POST  --http1.0 -d @mypost.txt http://myserver.com/index.php/json
Curl post text from file with response time measurement
[[email protected] ~]$ curl -s -w "%{time_total}\n" -o /dev/null -X POST -d @bilstatus.xml 192.168.10.110:8080/My_Service
Curl post xml from file with prettify the xml response
[[email protected] ~]$ curl -X POST -d @bilstatus.xml 192.168.10.110:8080/My_Service | xmllint --format -

Tidak ada komentar :

Posting Komentar