2015-10-14 128 views
0

我正在使用以下curl命令在我的終端中正常工作,從事OAUTH 2.0的工作。curl命令的等價http請求

命令 -

curl -u testclient1:testpass1 http://localhost/oauth2-server/token.php -d 'grant_type=password&username=bshaffer&password=brent123' 

我想知道什麼是對上述curl命令相當於HTTP請求,以便我可以使用狂飲(比較容易),使HTTP請求獲得令牌。我嘗試了很多組合,但沒有找到正確的方法來完成它。

+0

你可以使用一個數據包嗅探器,如Wireshark的,一看就知道捲曲發送實際的HTTP請求。 –

回答

1

最後經過大量的谷歌搜索,我設法找出該CURL命令的等效HTTP請求。

這裏是命令 -

http://testclient1:[email protected]/oauth2-server/token.php?grant_type=password&username=bshaffer&password=brent123