【发布时间】:2016-09-06 14:57:37
【问题描述】:
这是我的 Curl 请求如何从 android 应用程序请求它,
curl -v https://api.sandbox.paypal.com/v1/oauth2/token \
-H "Accept: application/json" \
-H "Accept-Language: en_US" \
-u "client_id:secret" \
-d "grant_type=client_credentials"
我花了很多时间却什么也没得到。并且HttpClient 也已弃用。所以请提供解决方案。
我还看到了以下 SO 链接,但我什么也没得到, Https post request using curl : Android
How to make same cURL request in android java?
还有更多。请帮忙。
【问题讨论】:
-
您可以使用它来代替已弃用的 HttpClient。 github.com/square/okhttp