curlcurl-commandline

How to write a post request in CURL containing more than one field


curl -v -XPOST -H'Content-Type: application/json' 'http://api.rofl21.com/login?  
?_request_id=714d3b1001bb01304e6840407e5a5c18&_pretty=true' -d
'{"facebook_access_token":"CAACP8nnDBXEBAHHQUPbZBC5kuLipPhooshJmXwGdk"}                                   

I even want send the gender in the post request as I am sending the fb_access_token.
Where will it be put?
After or before facebook_access_token and how will I write it..syntax??


Solution

  • curl -v -XPOST -H'Content-Type: application/json' 'http://api.rofl21.com/login?  
    ?_request_id=714d3b1001bb01304e6840407e5a5c18&_pretty=true' -d
    '{"facebook_access_token":"CAACP8nnDBXEBAHHQUPbZBC5kuLipPhooshJmXwGdk", "gender":"something", ... }  
    

    It doesn't matter where you put it.