Wearable OnlyWearable OnlyThe Response() constructor creates a new Response object.
Optionalbody: string | Uint8Array | BlobAn object defining a body for the response. This can be null (which is the default value), or one of: Blob, TypedArray, or string.
Optionaloptions: anyAn options object containing any custom settings that you want to apply to the response, or an empty object (which is the default value). The possible options are:
status - The status code for the response. The default value is 200.statusText - The status message associated with the status code, such as "OK". The default value is "".headers - Any headers you want to add to your response, contained within a Headers object or object literal of String key/value pairs (see HTTP headers for a reference). By default this is empty.Readonly Wearable OnlybodyTrue if one of the body retrieval methods has been called for this Response.
Readonly Wearable OnlyheadersThe Headers of the Response.
Readonly Wearable OnlyokTrue if the response returned HTTP Status Code 200 (OK).
Readonly Wearable OnlystatusThe response's HTTP status code. HTTP status code values: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status.
Readonly Wearable OnlystatusThe HTTP status code converted to string.
Readonly Wearable OnlyurlThe URL of the Response. This is the final URL obtained after any redirects.
Wearable OnlyRetrieve the body as Uint8Array.
Returns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Wearable OnlyRetrieve the body as a json object.
Wearable OnlyRetrieve the body as a string.
Represents an HTTP response used by the Fetch API in RemoteServiceModule.
Example