I get java.lang.IllegalStateException :
java.lang.IllegalStateException : Unable to set the request property after the connection made an error when the setRequestProperty method setRequestProperty called after url.openConnection();
Here is what I am trying:
URL url = new URL("https://49.205.102.182:7070/obsplatform/api/v1/mediadevices/545b801ce37e69cc"); urlConnection = (HttpsURLConnection) url .openConnection(); urlConnection.setRequestProperty("Content-Type","application/json");
any suggestions please? Thanks in advance.
source share