I have done some HTTP tamper data and trying to make my own curl post, but I'm afraid that I can't understand how these thing work, can anyone explain how do I put it on? based on my trustworthy tamper data on firefox there are three phases on submit data on this website, first is
URL : http://www.thisiswebsite.xyz/Nginx/script/order_handler.php
Method POST
Type xmlhttprequest
itemname : IFHPB-P14
orderstep : 1
and after that a HTTP Headers i think
URL : http://www.thisiswebsite.xyz/Nginx/script/order_handler.php
Method POST
Type xmlhttprequest
Host : www.thisiswebsite
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
Accept : text/html, */*; q=0.01
Accept-Language : en-US,en;q=0.5
Accept - Encoding : gzip, deflate
Referer : http://www.thisiswebsite/Nginx/index.php
Content-Type : application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With : XMLHttpRequest
Content-Length : 30
Connection : keep-alive
Cookie : PHPSESSID=6gjfhn0475l26oanag1bugs025
and finally is the submit post data
URL : http://www.thisiswebsite.xyz/Nginx/script/order_handler.php
Method POST
Type xmlhttprequest
itemname : IFHPB-P14
orderstep : 3
username : testing
hdsn : datatest
MAC : datatestmac
My try with curl
curl -X POST http://www.thisiswebsite.xyz/Nginx/script/order_handler.php \
-H 'Host: www.thisiswebsite.xyz' \
-H 'Connection: keep-alive' \
-H 'Accept: text/html, */*; q=0.01' \
-H 'Accept-Language: en-US,en;q=0.5' \
-H 'Accept - Encoding: gzip, deflate' \
-H 'Referer: http://www.thisiswebsite.xyz/Nginx/index.php' \
-H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Content-Length: 30' \
-H 'Cookie: PHPSESSID=6gjfhn0475l29oanagdbugs022' \
-A 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0' \
--data "itemname=IFHPB-P4&orderstep=3&username=cahya&hdsn=123&MAC=123"
Question: how do I make this 3 HTTP Data to a simple curl post?