Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from juliangruber/gh-pages
documented res.location
- Loading branch information
Showing
4 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
section | ||
h3(id='res.location') res.location | ||
p. | ||
Set the location header. | ||
|
||
+js. | ||
res.location('/foo/bar'); | ||
res.location('foo/bar'); | ||
res.location('http://example.com'); | ||
res.location('../login'); | ||
res.location('back'); | ||
|
||
p. | ||
You can use the same kind of <code>urls</code> as in | ||
<code>res.redirect()</code>. | ||
|
||
p. | ||
For example, if your application is mounted at <code>/blog</code>, | ||
the follwing would set the <code>location</code> header to | ||
<code>/blog/admin</code>: | ||
|
||
+js. | ||
res.location('admin') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters