什么是curl命令中的-vu

时间:2016-06-15 06:48:10

标签: curl oauth-2.0 postman

  

curl -X POST -vu clientapp:123456 http://localhost:8080/oauth/token -H   "接受:application / json" -d   "密码=弹簧&安培;用户名=罗伊&安培; grant_type =密码&安培;范围=读%20write&安培; client_secret = 123456&安培; CLIENT_ID = clientapp"

我们想在PostMan中执行上面的cURL命令。但我们不知道在哪里放置clientapp:123456。

提前致谢

2 个答案:

答案 0 :(得分:2)

虽然时间已晚,但我想回答以下问题: 您需要通过基本身份验证将 -vu 值设置为用户名密码enter image description here

答案 1 :(得分:1)

通常可以合并短选项,因此-vu-v -u相同。

man curl说:

-v, --verbose
              Be  more  verbose/talkative during the operation. Useful for debugging and seeing what's going on "under the hood". A line starting with '>'
              means "header data" sent by curl, '<' means "header data" received by curl that is hidden in normal cases, and  a  line  starting  with  '*'
              means additional info provided by curl.
-u, --user <user:password>
              Specify the user name and password to use for server authentication. Overrides -n, --netrc and --netrc-optional.