ResponseType enum

The type read-only property of the Response interface contains the type of the response.

MDN Reference

Inheritance

Constructors

ResponseType(String value)
const

Values

basic → const ResponseType

Normal, same origin response, with all headers exposed except "Set-Cookie".

const ResponseType("basic")
cors → const ResponseType

Response was received from a valid cross-origin request. Certain headers and the body may be accessed.

const ResponseType("cors")
error → const ResponseType

Network error. No useful information describing the error is available. The Response's status is 0, headers are empty and immutable. This is the type for a Response obtained from Response.error().

const ResponseType("error")
opaque → const ResponseType

Response for "no-cors" request to cross-origin resource. Severely restricted.

const ResponseType("opaque")
opaqueRedirect → const ResponseType

The fetch request was made with redirect: "manual". The Response's status is 0, headers are empty, body is null and trailer is empty.

const ResponseType("opaqueredirect")

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<ResponseType>
A constant List of the values in this enum, in order of their declaration.