I am stuck using HttpURLConnection to make a PUT http request to a web-server. I have some code that will make a PUT request just fine, and I can trivially incl
It's not obvious to me why they designed it this way, but the code that implements the Expect:100 logic is only used if you have called one of setFixedLengthStreamingMode(int contentlen) or the overload for long or setChunkedStreamingMode(int chunklen) before doing getOutputStream
. In this case I recommend the first as simplest.