Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I call a service with HTTP Basic using Postman?

I'm using curl to make a request:

curl -u NL91IOC2RWCM31G1ESWYX:SvCuj0tFQjmclZDFQzdMqfrGZ5Qw5jfKM8 \
  -H "Accept: application/json" \
  https://api.stormpath.com/v1/applications/649j4AnLkUMezhYTl61

How do I make this same request using Postman?

like image 643
Mule_Agent Avatar asked Apr 30 '26 19:04

Mule_Agent


1 Answers

curl -u key:secret sends a request with HTTP Basic authentication. It's easy to do this in Postman:

  1. Enter the endpoint URL in the address field.

Enter URL

  1. Switch to the Authorization tab and choose Basic Auth. Enter the key as Username and the secret as Password. Click Update Request to generate the proper Authorization header for the request.

Authorization

  1. Switch to the Headers tab and add the Accept header.

Headers

  1. Press Send.
like image 161
Nate Barbettini Avatar answered May 03 '26 19:05

Nate Barbettini



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!