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

瘦欲@ 提交于 2021-02-09 09:49:25

问题


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:

  1. Enter the endpoint URL in the address field.

  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.

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

  1. Press Send.


来源:https://stackoverflow.com/questions/37875432/how-do-i-call-a-service-with-http-basic-using-postman

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!