Answer by SoloPilot for What exactly does URLConnection.setDoOutput() affect?
Adding a comment, if you have a long lasting connection and you send both GETs and POSTs, this is what I do: if (doGet) { // some boolean con.setDoOutput(false); // reset any previous setting, if con...
View ArticleAnswer by Thilo for What exactly does URLConnection.setDoOutput() affect?
You need to set it to true if you want to send (output) a request body, for example with POST or PUT requests. With GET, you do not usually send a body, so you do not need it. Sending the request body...
View ArticleAnswer by Mithun Sasidharan for What exactly does URLConnection.setDoOutput()...
public void setDoOutput( boolean dooutput ) It takes a value as the parameter and sets this value of the doOutput field for this URLConnection to the specified value. A URL connection can be used for...
View ArticleAnswer by Petar Minchev for What exactly does URLConnection.setDoOutput()...
setDoOutput(true) is used for POST and PUT requests. If it is false then it is for using GET requests.
View ArticleWhat exactly does URLConnection.setDoOutput() affect?
There's setDoOutput() in URLConnection. According to documentation I should Set the DoOutput flag to true if you intend to use the URL connection for output, false if not. Now I'm facing exactly this...
View Article