Joe
Joe

Reputation: 13091

How to simulate CURL call in Postman?

I have a Curl call that works from my linux machine:

curl -XGET --insecure https://1.2.3.4:9200/_cat/ -u admin:admin

How to simulate it in Postman?

Thanks

Upvotes: 1

Views: 699

Answers (1)

shaochuancs
shaochuancs

Reputation: 16226

This curl call is consisted by 4 parameters:

  1. HTTP method is GET (-X GET). To simulate in Postman, choose GET (the default value) in the request panel.
  2. HTTP request is proceeded even if certificate verification is failed (--insecure). To simulate in Postman, turn off "SSL certificate verification" in Postman preference. According to the document, this only works in Postman native app.
  3. URL is https://1.2.3.4:9200/_cat/. To simulate this, copy and paste it in the address bar of request panel.
  4. Credential (-u admin:admin). To simulate this in Postman, configure it in the "Authorization" tab of request panel.

Here are some screenshot:

To simulate "GET https://1.2.3.4:9200/_cat/":

enter image description here

To simulate --insecure:

enter image description here

To simulate credential (take Basic auth for example, you can change to other types due to requirement):

enter image description here

Upvotes: 1

Related Questions