问题
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?
回答1:
curl -u key:secret
sends a request with HTTP Basic authentication. It's easy to do this in Postman:
- Enter the endpoint URL in the address field.
- 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.
- Switch to the Headers tab and add the Accept header.
- Press Send.
来源:https://stackoverflow.com/questions/37875432/how-do-i-call-a-service-with-http-basic-using-postman