Constructing an HTTP POST request using Curl and Postman -
i have been using curl & postman on chrome send http post requests 1 variable simple http server have running , have noticed construct requests differently. apologies if might have used incorrect terminology in constructing question - i'm still learning stuff.
using postman, request constructed putting '?' between resource name , variable. e.g.
http://192.168.0.2:9999/1/command?a=b
however, following curl command:
curl -x post http://192.168.0.2:9999/1/command --data a=b
does not put '?' between resource name , variable.
the result http server interprets requests differently.
in first case, body of request empty , in second case body contains a=b.
which version correct?
post
requests post data part of request body , get
requests via url parameters. if choose form data
option in postman
can pass same way (request body) in postman
well. how parameters sent in http post request? may worth reading.
Comments
Post a Comment