Condividi tramite


HttpURLConnection.RequestMethod Property

Definition

Get the request method. -or- Set the method for the URL request, one of: <UL> <LI>GET <LI>POST <LI>HEAD <LI>OPTIONS <LI>PUT <LI>DELETE <LI>TRACE </UL> are legal, subject to protocol restrictions.

public virtual string? RequestMethod { [Android.Runtime.Register("getRequestMethod", "()Ljava/lang/String;", "GetGetRequestMethodHandler")] get; [Android.Runtime.Register("setRequestMethod", "(Ljava/lang/String;)V", "GetSetRequestMethod_Ljava_lang_String_Handler")] set; }
[<get: Android.Runtime.Register("getRequestMethod", "()Ljava/lang/String;", "GetGetRequestMethodHandler")>]
[<set: Android.Runtime.Register("setRequestMethod", "(Ljava/lang/String;)V", "GetSetRequestMethod_Ljava_lang_String_Handler")>]
member this.RequestMethod : string with get, set

Property Value

the HTTP request method

Attributes

Exceptions

if this is called after connected, or the method is not supported by this HTTP implementation.

Remarks

Property getter documentation:

Get the request method.

Java documentation for java.net.HttpURLConnection.getRequestMethod().

Property setter documentation:

Set the method for the URL request, one of: <UL> <LI>GET <LI>POST <LI>HEAD <LI>OPTIONS <LI>PUT <LI>DELETE <LI>TRACE </UL> are legal, subject to protocol restrictions. The default method is GET.

Java documentation for java.net.HttpURLConnection.setRequestMethod(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

See also