我已经通过Postman发出了以下HTTP POST请求,以进行基本的oauth身份验证。查看邮递员在幕后发出的原始curl命令时,它看起来像这样:
curl -X POST \
https://api.twitter.com/oauth2/token \
-H 'Authorization: Basic Hdkdhfjdekrhfkhskierufh75947rhdklww==' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Postman-Token: c1b380a7-e4b3-4269-a789-1c7271f2986a' \
-d grant_type=client_credentials
如何使用Retrofit for Java发送等效请求?注意:我正在Eclipse中编写Java程序-我不在Android上尝试此操作。
答案 0 :(得分:0)
您可以使用拦截器来做0%, 0%, 100%
1%, 0%, 99%
0%, 1%, 99%
etc...
事情。