I have a curl that will make a post request. I have tried it in the command line and it works fine, so I know all my values that I should use. However, I am quite lost when it comes to translating this into Java.
I need to send form data and header data. The header is my authorization, and the form data contains both Strings and Dates, but again, the problem is that I don't know how to translate this into Java.
I have tried using URIBuilder and adding my form data with the addParameter, but it seems as if that one can only accept Strings and does not have any function for setting header information?
So I tried using HttpPost instead where I found the addHeader function that enables me to add my header data, but I did not find any function for adding the form data with this option.
I would be thankful if anyone could help me in any way possible.