BloomResponse.redirect constructor
Helper factory constructor for HTTP redirects.
Sets the Location: [location] header with the specified statusCode (default 302 Found).
Example
return BloomResponse.redirect('/login', statusCode: 303);
Implementation
factory BloomResponse.redirect(String location, {int statusCode = 302}) {
return BloomResponse(
statusCode: statusCode,
headers: {'location': location},
body: Uint8List(0),
);
}