This question may seem rather unusual for many experienced Java programmers, and I am not sure which forum this question fits best.
We've managed to write something that can send a POST request using a URL, but we are not too sure how to handle http headers and cookies for authentication purposes.
Are there any codes or simple tutorial we can take a look at? Advices on other things related to the above case/workaround would be appreciated too. Thank you very much for help.