I'm using HttpUrlConnection and I would like to change the request method to put
, this is the code:
uri = new URL(url);
con = (HttpURLConnection) uri.openConnection();
con.setConnectTimeout(60000); //60 secs
con.setReadTimeout(60000); //60 secs
//con.setRequestProperty("Accept-Encoding", "Your Encoding");
con.setRequestProperty("Authorization", authCode);
con.setRequestProperty("Content-Type", contentType);
con.setDoOutput(true);
con.setDoInput(true);
con.setRequestMethod(type);
but when i debug the project, the method is GET
what must I do so i can set it to PUT