URLConnection.AddRequestProperty(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a general request property specified by a key-value pair.
[Android.Runtime.Register("addRequestProperty", "(Ljava/lang/String;Ljava/lang/String;)V", "GetAddRequestProperty_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual void AddRequestProperty (string? key, string? value);
[<Android.Runtime.Register("addRequestProperty", "(Ljava/lang/String;Ljava/lang/String;)V", "GetAddRequestProperty_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member AddRequestProperty : string * string -> unit
override this.AddRequestProperty : string * string -> unit
Parameters
- key
- String
the keyword by which the request is known
(e.g., "Accept
").
- value
- String
the value associated with it.
- Attributes
Exceptions
if the connection has been already established.
if the property name is null
.
Remarks
Adds a general request property specified by a key-value pair. This method will not overwrite existing values associated with the same key.
Added in 1.4.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.