Java cURL commands

How to use the cURl command

curl https://na1.salesforce.com/services/data/v20.0/query?q=SELECT+name+from+Account -H "Authorization: Media access_token" -H "X-PrettyPrint: 1"

in java to call abandon sales service web services

+3


source to share


3 answers


Java has URLConnection Class

which has similar functionality to cURL.



+2


source


For interacting with the Salesforce API, it is best to use the client library and not do it all yourself, see http://blog.palominolabs.com/2011/03/03/a-new-java-salesforce-api-library/ for an example.



0


source


The easiest way is to download the cURL java wrapper like https://github.com/pjlegato/curl-java and use cURL right in your code.

The second way is to use the Runtime.getRuntime().exec("crul...")

" pattern " and run the curl like a normal process.

0


source







All Articles