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

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -