WebResourceResponse.SetStatusCodeAndReasonPhrase(Int32, String) Method

Definition

Sets the resource response's status code and reason phrase.

[Android.Runtime.Register("setStatusCodeAndReasonPhrase", "(ILjava/lang/String;)V", "GetSetStatusCodeAndReasonPhrase_ILjava_lang_String_Handler")]
public virtual void SetStatusCodeAndReasonPhrase (int statusCode, string reasonPhrase);
[<Android.Runtime.Register("setStatusCodeAndReasonPhrase", "(ILjava/lang/String;)V", "GetSetStatusCodeAndReasonPhrase_ILjava_lang_String_Handler")>]
abstract member SetStatusCodeAndReasonPhrase : int * string -> unit
override this.SetStatusCodeAndReasonPhrase : int * string -> unit

Parameters

statusCode
Int32

the status code needs to be in the ranges [100, 299], [400, 599]. Causing a redirect by specifying a 3xx code is not supported.

reasonPhrase
String

the phrase describing the status code, for example "OK". Must be non-empty.

Attributes

Remarks

Sets the resource response's status code and reason phrase.

Java documentation for android.webkit.WebResourceResponse.setStatusCodeAndReasonPhrase(int, 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