Allow redir to Uri
This commit is contained in:
parent
7fec4c243d
commit
76532f9509
2 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
# 2.0.0-alpha.11
|
||||
* Add `readMany` to `Service`.
|
||||
* Allow `ResponseContext.redirect` to take a `Uri`.
|
||||
|
||||
# 2.0.0-alpha.10
|
||||
* All calls to `Service.parseId` are now affixed with the `<Id>` argument.
|
||||
|
|
|
@ -175,8 +175,8 @@ abstract class ResponseContext<RawResponse>
|
|||
if (!isOpen) throw closed();
|
||||
headers
|
||||
..['content-type'] = 'text/html'
|
||||
..['location'] = url is String
|
||||
? url
|
||||
..['location'] = (url is String || url is Uri)
|
||||
? url.toString()
|
||||
: app.navigate(url as Iterable, absolute: absolute);
|
||||
statusCode = code ?? 302;
|
||||
write('''
|
||||
|
|
Loading…
Reference in a new issue