Commit graph

39 commits

Author SHA1 Message Date
2ef7846b5f Remove accepts, cache-content-type and content-type.
Replace content-disposition with one that doesn’t use safe-buffer
2019-09-29 19:17:14 +00:00
Gunnlaugur Thor Briem
3b23865340 docs: parameter of request.get is case-insensitive (#1373) 2019-08-19 10:43:35 +08:00
Dobes Vandermeer
132c9ee63f docs: Clarify the format of request.headers (#1325) 2019-06-03 15:58:02 +08:00
Saad Quadri
40a6dd2c80 docs: improve consistency in api code examples (#1029) 2017-07-20 18:01:03 -07:00
Chiahao Lin
87cde82399 docs: modified examples using the wrong keyword (yield -> await) (#1021) 2017-07-07 00:48:31 -07:00
Martin Iwanowski
327b65cb6b Use node 7+ WHATWG parser for hostname, fixes #1002 (#1004)
* Use node 7+ WHATWG parser for hostname, fixes #1002

* only use URL if host is IPv6, expose parsed URL

* catch invalid URLs, memoize empty obj

* hostname returns empty string when URL throws
2017-06-20 09:57:30 -07:00
Martin fl0w Iwanowski
012587889d added setters for header and headers, fixes #991 2017-06-20 09:57:07 -07:00
iamchenxin
fabf5864c6 Amend typo, request.is() return null|fasle|string. (#864)
Modifying the test for `null` from `==` to `===` to make sure it must be `null`.
2016-12-01 18:16:02 +08:00
jongleberry
2b094eb895 docs: update history and docs for v2 2016-03-22 11:03:19 -07:00
Robin Pokorný
340dd4f1a3 Lint JavaScript in Markdown 2016-03-16 16:50:10 +01:00
pana
b6b0d02df9 update docs 2015-10-24 17:21:47 +08:00
dead_horse
b2bcbcec7c docs: add request.origin 2015-10-03 11:38:48 +08:00
Matthew King
05b5912912 Clarify precondition for freshness check
I ran into the issue from #294 and thought it was a bug since fresh was always returning false. I think it's fair that, at the very least, the docs are not completely clear on how to use `this.fresh`.
2015-07-16 00:37:41 -07:00
fengmk2
3e66157472 ctx.request.href: get full request url, include protocol, host and originalUrl
Useful on those scenes need current full request url, like `OAuth`.
2014-12-27 14:17:00 -08:00
TJ Holowaychuk
30967f57ec docs: fix content negotiation section indentation 2014-10-09 09:11:09 -07:00
Peeyush Kushwaha
cc4a549b70 fixed typo in documentation 2014-09-27 17:38:21 +05:30
bhanuc
17e98e4e7d updated request.md and response.md 2014-09-25 17:06:23 +05:30
dead_horse
5ca9f451a7 alias request.headers as request.header 2014-08-07 00:04:21 +08:00
Jonathan Ong
31ba115231 res: add .is() 2014-06-13 00:30:59 -07:00
dead_horse
21b7eb82b9 add originalUrl 2014-05-06 10:01:46 +08:00
TJ Holowaychuk
55ebdb522b docs 2014-05-05 08:44:00 -07:00
dead_horse
f76268ba58 remove req.host=, fix docs 2014-05-05 12:45:33 +08:00
Sonny Piers
b7a747fc71 Fix typo in request api documentation. 2014-04-12 00:29:33 +02:00
TJ Holowaychuk
e56f442222 refactor request docs to use this.request
maybe we should do this with all of them, but then we might
need a section showing ctx.* stuff, people might miss the aliasing all together
2014-02-14 09:40:58 -08:00
TJ Holowaychuk
785aba879c add request.charset 2014-02-14 09:38:59 -08:00
Jonathan Ong
7e66aca8c3 better content negotiation docs
closes #193
2014-01-18 14:22:53 -08:00
pana
30d200dc09 remove the vary method from request object 2014-01-17 18:19:51 +08:00
pana
420a6154bc update document 2014-01-17 16:30:35 +08:00
TJ Holowaychuk
43a8c12028 docs for req.host= 2014-01-07 17:21:43 -08:00
jeromew
93351bf845 Add req.host= 2014-01-07 21:09:01 +00:00
Jonathan Ong
039805265f docs request: typo 2013-12-18 23:47:48 -08:00
TJ Holowaychuk
97a3d84ec9 docs 2013-12-17 23:53:58 -08:00
TJ Holowaychuk
a2582e7aa3 change req.is() to return the canonical mime type 2013-11-28 12:47:23 -08:00
Jonathan Ong
8717a3ad2b req.is(): make better
closes #105 and #106
2013-11-28 00:13:16 -08:00
Jonathan Ong
e2cd1f02ca docs: req.accepts(): throw a 406 2013-11-20 18:06:45 -08:00
Jonathan Ong
1d38d4acd1 req.accepts: default to first 'type' 2013-11-20 18:00:24 -08:00
Jonathan Ong
5ae3f4eb30 req.acceptsEncodings: default to 'identity' 2013-11-20 17:46:11 -08:00
Jonathan Ong
dc873d66e2 docs: add res.lastModified and res.etag among other things 2013-11-19 22:40:52 -08:00
TJ Holowaychuk
c699c75c52 add koa Request / Response objects and delegation. Closes #52 2013-11-13 09:01:15 -08:00