How do I write the following APIGEE related curl command in Java
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" \
https://{org-name}-test.apigee.net/oauth/client_credential/accesstoken?
grant_type=client_credentials \
-d 'client_id={consumer-key}&client_secret={consumer-secret}'
Using curl is not allowed in our company so want to execute the command from Java. Any help would be appreciated.
Note - To some extent this URL was helpful How do i do the following curl command in Java