# Convert Postman Successful JSON command to Successful cURL command

**URL:** <https://community.postman.com/t/convert-postman-successful-json-command-to-successful-curl-command/691>\
**Category:** Help Hub\
**Tags:** curl\
**Created:** [January 15, 2018, 9:05pm UTC](https://community.postman.com/t/convert-postman-successful-json-command-to-successful-curl-command/691 "2018-01-15T21:05:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SoonerLater](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@SoonerLater](https://community.postman.com/u/SoonerLater)\
**Post date:** [January 15, 2018, 9:05pm UTC](https://community.postman.com/t/convert-postman-successful-json-command-to-successful-curl-command/691/1 "2018-01-15T21:05:42Z")

</div>

I have a command that works successfully in Postman:

Method: POST  
Address: 192.168.1.83:8080/jsonrpc  
Body: {“jsonrpc”: “2.0”, “method”: “Input.Up”, “id”: 1}  
Type: JSON (application/json)

A screenshot of this is in this image album [https://imgur.com/a/iPKqA](https://imgur.com/a/iPKqA)

It does what I want and returns a success message ({“id”:1,“jsonrpc”:“2.0”,“result”:“OK”}).

If I click the Code button by the right margin,

Partial screenshot in album.

it gives me several ways to see the code that Postman is generating.

Partial screenshot in album.

I choose cURL

Partial screenshot in album.

and it gives me this code

curl -X POST   
[http://192.168.1.83:8080/jsonrpc](http://192.168.1.83:8080/jsonrpc)   
-H ‘Cache-Control: no-cache’   
-H ‘Content-Type: application/json’   
-H ‘Postman-Token: 82ec87fb-667f-a0fe-182e-9621199274ae’   
-d ’ {“jsonrpc”: “2.0”, “method”: “Input.Up”, “id”: 1}’

Partial screenshot in album.

When I try to use that code at a Windows command prompt, it doesn’t work

Partial screenshot in album.

**How can I generate a code snippet that I can run from a Windows command prompt that will work?**

---

<div class="post-metadata">

**Author:** ![dhoyt](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/dhoyt/32/238_2.png) [@dhoyt](https://community.postman.com/u/dhoyt)\
**Post date:** [January 16, 2018, 2:14pm UTC](https://community.postman.com/t/convert-postman-successful-json-command-to-successful-curl-command/691/2 "2018-01-16T14:14:35Z")

</div>

You have to install curl on your Windows box. I found this on stack overflow …

1. Visit download page [https://curl.haxx.se/download.html](https://curl.haxx.se/download.html) - it’s incredible
2. Choose your sytem in list
3. Don’t forget SSL support, it’s obvious now, e.g. for https
4. Unpack curl.exe and .crt to C:\Windows\System32
5. Restart cmd
6. Enjoy \> curl [https://api.stackexchange.com](https://api.stackexchange.com)
7. p.s. If you want another folder to store executable check your paths \> echo %PATH%

---

<div class="post-metadata">

**Author:** ![SoonerLater](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@SoonerLater](https://community.postman.com/u/SoonerLater)\
**Post date:** [January 16, 2018, 2:36pm UTC](https://community.postman.com/t/convert-postman-successful-json-command-to-successful-curl-command/691/3 "2018-01-16T14:36:19Z")

</div>

Thank you. I’d actually already installed Curl and had been running it before trying Postman. My frustration is that there are commands that I can run successfully in Postman that I cannot figure out how to run using curl.exe at the Windows command prompt. I’m trying to move from the (wonderful) environment of Postman holding my hand and making everything easy to the quick and dirty world of command line.

If you know how to convert a Postman command into one I can run at the command line using curl.exe, please comment.

---

<div class="post-metadata">

**Author:** ![amjathk](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@amjathk](https://community.postman.com/u/amjathk)\
**Post date:** [January 16, 2018, 4:03pm UTC](https://community.postman.com/t/convert-postman-successful-json-command-to-successful-curl-command/691/4 "2018-01-16T16:03:04Z")

</div>

from the attached image i can say your curl command should be in one single line(can include space not enter)

curl -X POST [http://192.168.1.83:8080/jsonrpc](http://192.168.1.83:8080/jsonrpc) -H ‘Cache-Control: no-cache’ -H ‘Content-Type: application/json’ -H ‘Postman-Token: 82ec87fb-667f-a0fe-182e-9621199274ae’ -d ’ {“jsonrpc”: “2.0”, “method”: “Input.Up”, “id”: 1}’

---

<div class="post-metadata">

**Author:** ![amithvakkalagadda](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@amithvakkalagadda](https://community.postman.com/u/amithvakkalagadda)\
**Post date:** [May 13, 2019, 7:08pm UTC](https://community.postman.com/t/convert-postman-successful-json-command-to-successful-curl-command/691/5 "2019-05-13T19:08:39Z")

</div>

How to do the same thing in the mac terminal.?

Please help me out…!!
