- field
- the request header field to be set.
- newValue
- the new value of the specified property.
Type Reason Java.Lang.IllegalStateException if the connection has been already established. Java.Lang.NullPointerException if the parameter field is null.
Sets the value of the specified request header field. The value will only be used by the current URLConnection instance. This method can only be called before the connection is established.