Freigeben über


URLConnection.GetRequestProperty(String) Method

Definition

Returns the value of the named general request property for this connection.

[Android.Runtime.Register("getRequestProperty", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetRequestProperty_Ljava_lang_String_Handler")]
public virtual string? GetRequestProperty (string? key);
[<Android.Runtime.Register("getRequestProperty", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetRequestProperty_Ljava_lang_String_Handler")>]
abstract member GetRequestProperty : string -> string
override this.GetRequestProperty : string -> string

Parameters

key
String

the keyword by which the request is known (e.g., "Accept").

Returns

the value of the named general request property for this connection. If key is null, then null is returned.

Attributes

Exceptions

if the connection has been already established.

Remarks

Returns the value of the named general request property for this connection.

Java documentation for java.net.URLConnection.getRequestProperty(java.lang.String).

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.

Applies to