I'm a newbie in java and need help in how to use the cURL in java and saving the output of the cURL command to a file in runtime.
Let's consider as i'm using the below URL which i have to cURL in the linux machine.
http://maniv.com/maniv/rest?method=sendMessage&msg_type=binary¶meter1=9999999¶meter2=9999999
When i'm hitting the above URL using curl "http://maniv.com/maniv/rest?method=sendMessage&msg_type=binary¶meter1=9999999¶meter2=9999999" in linux, it will give the ouput as:
Message | sent | successfully
Now i need to write the output into a new file based on the parameter1 as file name each time, when i change the parameter1 and hit the URL.