the reluctant tester

Perpetual learner of the craft of Software Testing,Servant Leadership and creating better Teams

Using cURL commands in a REST client , without wanting to know cURL ;)

I am a newbie to cURL and dont understand cURL commands , neither have I used cURL to make REST API calls before.

Recently I encountered a situation where I had access to some cURL “code” and I had to use that perform some GET and POST operations on a REST end-point.

Due to lack of time ( and laziness) to learn cURL , I took a punt and started exploring as to whether the marvelous Postman tool had an easy way to convert cURL commands to some kind of REST API call structure .

And viola , Postman did not disappoint again , this can be achieved in a few clicks

Step 1 :: Find cURL commands that represent your code –

curl https://{subdomain}.{domain}.com/api/v2/groups.json \
  -H "Content-Type: application/json" -d '{"group": {"name": "My Group"}}'
  -v -u {email_address}:{password} -X POST

Step 2: Open Postman and click import (next to the “new” button)

Step 3: In the ensuing dialog box, choose the raw text tab and paste the cURL snippet

Step 4: Click import and there you have it , Postman has created a POST request with the desired end point & JSON payload from the cURL commands in a new tab . You can now tweak away and modify/run the call as you see fit 🙂



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

About Me

I’m Sunjeet Khokhar

An experienced People Leader,Practice Lead  and Test Manager .

I am driven by the success of people around me, am a keen student of organisational behaviour and firmly believe that we can be better craftspeople by being better humans first.

CoNNECT with Me

%d bloggers like this: