【问题标题】:How to make this paypal curl request in java如何在java中发出这个paypal curl请求
【发布时间】: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?

还有更多。请帮忙。

【问题讨论】:

标签: android http curl


【解决方案1】:

正确的方法是使用:Retrofit

低级正确方式:OkHttp

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-04-17
    • 1970-01-01
    • 2023-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-23
    • 1970-01-01
    相关资源
    最近更新 更多