Converting CURL request to HTTP Request Java by method GET -


i have following curl request can please confirm me subsequent http request:

curl -i -l -h "accept: application/json" --data "client_id=app-uja2fdflivk14wmw&client_secret=6d8d32f1-1c25-4356-8b15-4d803d9a869e&grant_type=authorization_code&code=dj4kyk&redirect_uri=https://developers.google.com/oauthplayground" "https://api.sandbox.orcid.org/oauth/token" 

can kind enough me convert above curl request httpreq.

you should have @ post: using java.net.urlconnection fire , handle http requests

you should able pass data part is:

urlconnection connection = new url(url + "?" + datastring).openconnection(); 

using:

connection.setrequestproperty("accept: application/json", charset); 

to add header

this starting point...


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -