I looked at the source code for URLConnection.setRequestProperty()in android studio and it looks like it is not installing anything:
public void setRequestProperty(String field, String newValue) {
checkNotConnected();
if (field == null) {
throw new NullPointerException("field == null");
}
}
and here checkNotConnected ():
private void checkNotConnected() {
if (connected) {
throw new IllegalStateException("Already connected");
}
}
What am I missing here? HttpURLConnectionan "expanding class" has no implementation setRequestProperty(), so it seems that this method does absolutely nothing.
user4980063
source
share