curl: provide user and password for apache .htaccess file

前端 未结 2 577
情书的邮戳
情书的邮戳 2021-02-12 11:14

I am using cURL to test some RESTful APIs. Some of these APIs are served from an Apache machine, and protected with user/password combination using simple .httaccess

2条回答
  •  旧巷少年郎
    2021-02-12 11:42

    Use this curl option for the commandline

    -u "User:Password"
    

    More details about this parameter can be found from here.

提交回复
热议问题