Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Curl -u in POSTMAN

Tags:

I try to do the next Request. but i cant find how to put '-u' in POSTMAN UI param.

Where can I put the -u param in the Program.

$ curl https://core.spreedly.com/v1/gateways.json 
  -u 'Ll6fAtoVSTyVMlJEmtpoJV8S:R3SD2XD4Io5VXmyzdCtTivHFTTSy' 
  -H 'Content-Type: application/json' \
  -d '{
        "gateway": {
          "gateway_type": "test"
        }
      }'
like image 471
Gilberto Ibarra Avatar asked Feb 17 '16 21:02

Gilberto Ibarra


1 Answers

The -u option in cURL performs Basic Authentication, where you can effectively "sign in" to an API by using a username and password.

You can add Basic Authentication to your Postman request under Authentication > Basic Auth. In your example, the text before the : in the -u option is the username and the text after is the password.

enter image description here

like image 64
Aaron Christiansen Avatar answered Oct 15 '22 02:10

Aaron Christiansen