What does '--user' mean with curl

后端 未结 4 2004
傲寒
傲寒 2020-12-29 19:15

I\'m working with an API and I have to send a POST request. I know how to set a header (-H) and (-d) is the body, but what is \"--user\".

If I submit this with Postm

4条回答
  •  臣服心动
    2020-12-29 20:12

    --user (or -u) in curl provides a basic auth to your request.

    In Postman you can achieve the same result with a choice in Authorization tab.

    --user ":" becomes

    • Type: Basic Auth
    • Username: client_id
    • Password: client_secret

提交回复
热议问题