Response.found constructor

Response.found(
  1. Uri location, {
  2. Body? body,
  3. Headers? headers,
})

Constructs a 302 Found response.

This indicates that the requested resource has moved temporarily to a new URI. location is that URI; it can be either a String or a Uri. It's automatically set as the Location header in headers.

body is the response body. It may be a Body instance or null to indicate no body. Use Body.fromString, Body.fromBytes, or Body.fromDataStream to create the body with the appropriate content type and encoding.

headers must contain values that are either String or List<String>. An empty list will cause the header to be omitted.

Implementation

Response.found(final Uri location, {final Body? body, final Headers? headers})
  : this._redirect(302, location, body, headers);