Post with CURL to API -


i'm having trouble sending post request via curl:

curl -h "content-type: application/json" -x post -d '{"username":"test@test.com", "password":"testpassword", "verify":"testpassword", first_name="mo", last_name="lester"}' http://stuff.com/signup

the error message i've received said server isn't getting password, , none of data @ all.

i tried posting quotes around url, without luck.

new curl, forgive ignorance.

you forgot quotes around first_name , last_name elements , you've included = in assignments instead of json : character results in invalid json other end won't able parse. corrected valid json request:

curl -h "content-type: application/json" -x post -d '{"username":"test@test.com", "password":"testpassword", "verify":"testpassword", "first_name": "mo", "last_name": "lester"}' http://stuff.com/signup 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -