Trying to do a simple POST Request, but am getting the error: "Length Required".
I've tried various approaches including not including the Content-Length (since Java may overwrite it) and issuing a zero-length Content-Length. Below, I am trying another method -- passing the length of the Request string.
Nothing I've tried thus far has worked. Still get the same "Length required".
You shouldn't have to set the Content-Length header. This header is set automatically based on the content you've written to the message body. Of course, this means you have to write the message body, even if it's zero bytes: