@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="Response")
public class Response
extends JsObject
| Constructor and Description |
|---|
Response()
The Response() constructor creates a new Response object.
|
Response(Blob body)
The Response() constructor creates a new Response object.
|
Response(Blob body,
ResponseInit init)
The Response() constructor creates a new Response object.
|
Response(BodyInit body)
The Response() constructor creates a new Response object.
|
Response(BodyInit body,
ResponseInit init)
The Response() constructor creates a new Response object.
|
Response(BufferSource body)
The Response() constructor creates a new Response object.
|
Response(BufferSource body,
ResponseInit init)
The Response() constructor creates a new Response object.
|
Response(FormData body)
The Response() constructor creates a new Response object.
|
Response(FormData body,
ResponseInit init)
The Response() constructor creates a new Response object.
|
Response(ReadableStream body)
The Response() constructor creates a new Response object.
|
Response(ReadableStream body,
ResponseInit init)
The Response() constructor creates a new Response object.
|
Response(java.lang.String body)
The Response() constructor creates a new Response object.
|
Response(java.lang.String body,
ResponseInit init)
The Response() constructor creates a new Response object.
|
Response(URLSearchParams body)
The Response() constructor creates a new Response object.
|
Response(URLSearchParams body,
ResponseInit init)
The Response() constructor creates a new Response object.
|
Response(XMLHttpRequestBodyInit body)
The Response() constructor creates a new Response object.
|
Response(XMLHttpRequestBodyInit body,
ResponseInit init)
The Response() constructor creates a new Response object.
|
| Modifier and Type | Method and Description |
|---|---|
Promise<ArrayBuffer> |
arrayBuffer()
The arrayBuffer() method of the Body mixin takes a Response stream and reads it to completion.
|
Promise<Blob> |
blob()
The blob() method of the Body mixin takes a Response stream and reads it to completion.
|
ReadableStream |
body()
The body read-only property of the Body mixin is a simple getter used to expose a ReadableStream of the body contents.
|
boolean |
bodyUsed()
The bodyUsed read-only property of the Body mixin contains a Boolean that indicates whether the body has been read yet.
|
Response |
clone_()
The clone() method of the Response interface creates a clone of a response object, identical in every way, but stored in a different variable.
|
static Response |
error()
The error() method of the Response interface returns a new Response object associated with a network error.
|
Promise<FormData> |
formData()
The formData() method of the Body mixin takes a Response stream and reads it to completion.
|
Headers |
headers()
The headers read-only property of the Response interface contains the Headers object associated with the response.
|
Promise<jsinterop.base.Any> |
json()
The json() method of the Body mixin takes a Response stream and reads it to completion.
|
boolean |
ok()
The ok read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.
|
static Response |
redirect(java.lang.String url)
The redirect() method of the Response interface returns a Response resulting in a redirect to the specified URL.
|
static Response |
redirect(java.lang.String url,
int status)
The redirect() method of the Response interface returns a Response resulting in a redirect to the specified URL.
|
boolean |
redirected()
The read-only redirected property of the Response interface indicates whether or not the response is the result of a request you made which was redirected.
|
int |
status()
The status read-only property of the Response interface contains the status code of the response (e.g., 200 for a success).
|
java.lang.String |
statusText()
The statusText read-only property of the Response interface contains the status message corresponding to the status code (e.g., OK for 200).
|
Promise<java.lang.String> |
text()
The text() method of the Body mixin takes a Response stream and reads it to completion.
|
java.lang.String |
type()
The type read-only property of the Response interface contains the type of the response.
|
java.lang.String |
url()
The url read-only property of the Response interface contains the URL of the response.
|
assign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, valuespublic Response(@Nullable
BodyInit body,
@Nonnull
ResponseInit init)
public Response(@Nonnull
ReadableStream body,
@Nonnull
ResponseInit init)
public Response(@Nonnull
XMLHttpRequestBodyInit body,
@Nonnull
ResponseInit init)
public Response(@Nonnull
Blob body,
@Nonnull
ResponseInit init)
public Response(@Nonnull
BufferSource body,
@Nonnull
ResponseInit init)
public Response(@Nonnull
FormData body,
@Nonnull
ResponseInit init)
public Response(@Nonnull
URLSearchParams body,
@Nonnull
ResponseInit init)
public Response(@Nonnull
java.lang.String body,
@Nonnull
ResponseInit init)
public Response(@Nullable
BodyInit body)
public Response(@Nonnull
ReadableStream body)
public Response(@Nonnull
XMLHttpRequestBodyInit body)
public Response(@Nonnull
Blob body)
public Response(@Nonnull
BufferSource body)
public Response(@Nonnull
FormData body)
public Response(@Nonnull
URLSearchParams body)
public Response(@Nonnull
java.lang.String body)
public Response()
@JsProperty(name="body") @Nullable public ReadableStream body()
@JsProperty(name="bodyUsed") public boolean bodyUsed()
@JsProperty(name="headers") @Nonnull public Headers headers()
@JsProperty(name="ok") public boolean ok()
@JsProperty(name="redirected") public boolean redirected()
@JsProperty(name="status") public int status()
@JsProperty(name="statusText") @Nonnull public java.lang.String statusText()
@JsProperty(name="type") @Nonnull @ResponseType public java.lang.String type()
@JsProperty(name="url") @Nonnull public java.lang.String url()
@Nonnull public static Response error()
@Nonnull public static Response redirect(@Nonnull java.lang.String url, int status)
@Nonnull public static Response redirect(@Nonnull java.lang.String url)
@JsMethod(name="clone") @Nonnull public Response clone_()
@Nonnull public Promise<ArrayBuffer> arrayBuffer()
@Nonnull public Promise<Blob> blob()
@Nonnull public Promise<FormData> formData()
@Nonnull public Promise<jsinterop.base.Any> json()
@Nonnull public Promise<java.lang.String> text()