Android Guides | Samples

Android.Webkit.WebResourceResponse Class

Encapsulates a resource response.

See Also: WebResourceResponse

Syntax

[Android.Runtime.Register("android/webkit/WebResourceResponse", DoNotGenerateAcw=true)]
public class WebResourceResponse : Object

Remarks

Encapsulates a resource response. Applications can return an instance of this class from WebViewClient.ShouldInterceptRequest(WebView,IWebResourceRequest) to provide a custom response when the WebView requests a particular resource.

[Android Documentation]

Requirements

Namespace: Android.Webkit
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11

The members of Android.Webkit.WebResourceResponse are listed below.

See Also: Object

Public Constructors

Constructs a resource response with the given MIME type, encoding, and input stream.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

DataStream. Gets the input stream that provides the resource response's data.
EncodingString. Gets the resource response's encoding.
MimeTypeString. Gets the resource response's MIME type.
[read-only]
ReasonPhraseString. Gets the description of the resource response's status code.
ResponseHeadersIDictionary<string, string>. Gets the headers for the resource response.
[read-only]
StatusCodeInt32. Gets the resource response's status code.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

SetStatusCodeAndReasonPhrase(Int32, String)
Sets the resource response's status code and reason phrase.