Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3637

Convert cURL to Postman REST Call

$
0
0

How can I convert the following cURL command to a Postman rest call?

curl -X POST abc.com/input.import         -H 'content-type: application/x-www-form-urlencoded'        --data-urlencode "apiKey=123-456"        --data-urlencode "secret=12/her"        --data-urlencode "userKey=ApUR"        --data-urlencode "email=fakeImportedAccount@example.com"        --data-urlencode "profile={'firstName':'John','lastName':'Kira'}" 

I tried the following:

URL: (POST) abc.com/input.import

Header: Content-Type:application/json

Body:

{"apiKey":"123-456","userKey":"ApUR","secret":"12/her","email":"fakeImportedAccount@example.com","profile": {"firstName":"John","lastName":"Kira"    }}

EDIT: Raw-body format in Postman is required. Import creates the request in "x-www-form-urlencoded" form


Viewing all articles
Browse latest Browse all 3637

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>