Skip to content

Tag: curl

proper curl command for delete with > one word as the parameter

I have a rest request like the following: the id is a String, and can have multiple words with spaces in between like I would like to construct a curl command that supports String with spaces, but I don’t know how. Below does not pick up second word. grateful for ideas. Thanks Answer The answer was provided by VGR. URLs

Get Json / Resonse body from Curl Post Request in Java

This is the method I have written which sends a POST request to send an Email. I am able to send the email and get the Response Code 200 Ok. But I don’t know how to get the JSON Response and convert it into an Object. Can someone please tell me how to do this? Answer A basic search reveals:

Including a .pem certificate in a Java HTTP request

I am currently able to access a web service that requires a client certificate using the following curl command: curl -k -v –cert ./certificate.pem How do I make this request in a Java application? Notice that I need the -k flag which allows curl to make “insecure” SSL connections. This needs to be done in the Java application as