0

This is my Curl request how to request it from android apps,

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"

And I spend a lot of time but didn't get anything. And HttpClient also deprecated. So please provide the solution to do it.

And also I have seen the following SO links but I didn't get anything, Https post request using curl : Android

How to make same cURL request in android java?

And much more. Please help.

Community
  • 1
  • 1
Aman Gupta - ΔMΔN
  • 2,971
  • 2
  • 19
  • 39

1 Answers1

0

Right way is to use: Retrofit

Lower level right way : OkHttp

Denis Royz
  • 118
  • 3