Udostępnij za pośrednictwem


HttpURLConnection.ResponseMessage Property

Definition

Gets the HTTP response message, if any, returned along with the response code from a server.

public virtual string? ResponseMessage { [Android.Runtime.Register("getResponseMessage", "()Ljava/lang/String;", "GetGetResponseMessageHandler")] get; }
[<get: Android.Runtime.Register("getResponseMessage", "()Ljava/lang/String;", "GetGetResponseMessageHandler")>]
member this.ResponseMessage : string

Property Value

the HTTP response message, or null

Attributes

Exceptions

if there is an error during the retrieval.

Remarks

Gets the HTTP response message, if any, returned along with the response code from a server. From responses like:

HTTP/1.0 200 OK
            HTTP/1.0 404 Not Found

Extracts the Strings "OK" and "Not Found" respectively. Returns null if none could be discerned from the responses (the result was not valid HTTP).

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

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