I have been trying to implement custom request method in HTTP header while posting my data to the server URL.
My application specific URL accepts -X parameter and -d for the data and it is mandatory for that url.
Basically I am trying to dump JSON data into my influx DB using CURL command which is working fine from the shell.
But the issue is, if I am implementing the same in java with proper approach, it is not supported or working.
My CURL command is : curl -X POST -d '<my_json_data>' '<my_url>'
How can I implement the same in java using HttpUrlConnection or other available approach?