user3603308
user3603308

Reputation: 355

Import curl into postman

I'm working with an api endpoint that has the following curl. When I import the curl into postman, the key column is populated with both the key and the value.

enter image description here

curl "https://{{Environments}}/v1/initiate" \
-H "Authorization: Bearer {accessToken}"
-X POST \
-d '{
      "clientId": "1234",
      "password": "5678",
      "pairingCode": "9101112"
     }'

Upvotes: 2

Views: 1872

Answers (1)

Danny Dainton
Danny Dainton

Reputation: 25891

Try adding the -H "Content-Type: application/json" header to the request:

curl "https://{{Environments}}/v1/initiate" \
-H "Authorization: Bearer {accessToken}" \
-H "Content-Type: application/json" \
-X POST \
-d '{
      "clientId": "1234",
      "password": "5678",
      "pairingCode": "9101112"
    }'

When I copy the code above into Postman:

Postman

Upvotes: 1

Related Questions