Commit graph

149 commits

Author SHA1 Message Date
Jonathan Ong
d768ed83b6 docs: note stream error handling and destruction. ref: 2016-03-12 14:22:28 -08:00
dead_horse
a808671340 add app.silent, err.status, err.expose to doc, fixes 2016-03-12 14:20:46 -08:00
Lee Bousfield
6a147726bd Add support for flushing headers 2016-03-03 21:01:56 -07:00
pana
1e38b13a94 docs: update docs for koa v2
update readme and request, response toJSON method

update readme

update readme

update readme

update readme

update readme

update readme

update docs

update doc

pretty readme

update docs

fix then callback
2016-01-17 16:05:49 -08:00
jongleberry
a09000357d add docs for babel 2015-11-06 09:45:53 -08:00
Kwyn Alice Meagher
dce805b0ad Fix typo in example for Koa instantiation
need a capital Koa constant
2015-10-24 12:35:08 -07:00
Slobodan Stojanovic
863fce310b Update docs - add template strings and arrow functions where applicable 2015-10-24 14:01:53 +02:00
pana
b6b0d02df9 update docs 2015-10-24 17:21:47 +08:00
Arjun
3045b283fd Fixed typo in docs/api/index.md 2015-10-13 16:09:01 -04:00
Tejas Manohar
93ade5e2dd refactor Application into a class 2015-10-13 01:19:42 -05:00
dead_horse
b2bcbcec7c docs: add request.origin 2015-10-03 11:38:48 +08:00
Travis Jeffery
e710b4b05f add app.context docs 2015-08-30 22:20:53 -05:00
Matthew King
05b5912912 Clarify precondition for freshness check
I ran into the issue from  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
Yiyu He
34c36d05c3 Merge pull request from soygul/patch-1
Update doc example to use ctx.state
2015-04-24 01:13:00 +08:00
dead_horse
1c5cb6f691 feat: alias response.headers to response.header 2015-04-23 17:28:31 +08:00
Teoman Soygul
d5b73ebe4f update doc example to use ctx.state 2015-04-16 15:43:45 +02:00
Jonathan Ong
963d46e46b bump supported iojs/node versions 2015-02-01 16:35:17 -08:00
dead_horse
5a3f32dfdd Add res.append(field, val) to append headers 2015-01-26 02:20:08 +08:00
Jonathan Ong
6cb5a9b9b8 n 0.11 2014-12-30 11:47:36 -08: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
Guilherme Pacheco
6d09053dac Update response.md 2014-12-04 15:14:05 -08:00
Matthew Mueller
6847fe68bd added: ctx.state as the recommended namespace for passing information through middleware and routes. 2014-11-18 00:54:14 -08:00
TJ Holowaychuk
30967f57ec docs: fix content negotiation section indentation 2014-10-09 09:11:09 -07:00
dead_horse
efdd7d3716 less strict for status, close
add res.message[=]
2014-10-09 23:20:53 +08: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
Jonathan Ong
85da935759 add .assert() docs 2014-09-20 13:19:07 -07:00
Ian Storm Taylor
dc0c35471c support errors and update docs 2014-08-12 13:22:33 -07:00
dead_horse
a85889e6c6 docs: add ctx.headers alias 2014-08-09 13:39:36 +08:00
TJ Holowaychuk
f84bf23169 add docs for .throw() properties 2014-08-08 13:31:28 -07:00
dead_horse
5ca9f451a7 alias request.headers as request.header 2014-08-07 00:04:21 +08:00
TJ Holowaychuk
db0875208d docs 2014-06-13 09:02:06 -07:00
Jonathan Ong
31ba115231 res: add .is() 2014-06-13 00:30:59 -07:00
TJ Holowaychuk
71536b35be remove res.statusString 2014-06-10 14:31:41 -07:00
Jonathan Ong
fdbd16acc3 remove response.append(), use vary module 2014-06-05 16:06:15 -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
TJ Holowaychuk
50ffb86a40 Merge pull request from dead-horse/host-setter
remove req.host=
2014-05-05 08:42:28 -07:00
dead_horse
f76268ba58 remove req.host=, fix docs 2014-05-05 12:45:33 +08:00
Tim Schaub
d7d3e84d16 Using property properly 2014-05-03 15:21:07 -06:00
TJ Holowaychuk
212137139a add installation docs back
wtf...
2014-05-01 16:36:16 -07:00
TJ Holowaychuk
f17629d19f remove .outputErrors, suppress output when handled by the dev. Closes 2014-05-01 16:29:37 -07:00
Sonny Piers
b7a747fc71 Fix typo in request api documentation. 2014-04-12 00:29:33 +02:00
Sonny Piers
d92a3c371f Update index.md 2014-04-12 00:23:11 +02:00
alsotang
bef5bad738 Update context.md
ctx.type is delegated to this.response.
2014-03-08 14:19:40 +08:00
TJ Holowaychuk
b1f0abd16d Revert "add response.charset accessor and ctx.charset alias"
This reverts commit 94413b1bd4.
2014-03-06 18:05:01 -08: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
TJ Holowaychuk
94413b1bd4 add response.charset accessor and ctx.charset alias 2014-02-14 09:33:10 -08:00
TJ Holowaychuk
c0e0c7c6aa update docs for previous breaking change 2014-02-14 09:20:29 -08:00
Qiming zhao
14cdfb7fc4 fix doc, getter of type is delegated to request
Same kind of confusing thing as  mentioned, user have to remember that getters and setters of the `length` and `type` property are different.
2014-02-14 13:42:04 +08:00
Jonathan Ong
abb5686d5b docs: add note about confusing context accessors 2014-02-13 18:23:45 -08:00
TJ Holowaychuk
aa08845c70 remove app.jsonSpaces setting. Closes 2014-01-31 18:39:47 -08:00
Jonathan Ong
2bc3bb7327 this.respond=false for bypassing koa's response handling
closes 
2014-01-24 14:38:40 -08:00
Jonathan Ong
7e66aca8c3 better content negotiation docs
closes 
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
26fb6a138a add ctx.host= delegate 2014-01-07 17:22:46 -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
bafc0109fc Update response.md 2014-01-04 12:11:03 -08:00
Jonathan Ong
aa50c8ba7a docs: update docs on res.status and res.body 2014-01-04 02:05:05 -08:00
Jonathan Ong
d9e56b901d docs: clarify node response property support 2013-12-30 22:08:56 -08:00
Debjeet Biswas
e492899443 Fix typo in api/index.md
* `negotation` to `negotiation`
2013-12-30 05:06:49 +05:30
Jonathan Ong
969614dba1 docs: manual responses are not supported
closes 
2013-12-26 00:11:14 -08:00
Jonathan Ong
86effcd5c6 docs: move context aliases below context-specific stuff 2013-12-24 22:59:55 -08:00
yosssi
b047805f9e Fixed the link url to the list of middlewares on docs/api/index.md. 2013-12-24 21:13:42 +09:00
TJ Holowaychuk
cfeefac191 docs: typo 2013-12-22 07:33:37 -08:00
nicoder
46163dba03 fix typo 2013-12-22 13:26:30 +01:00
TJ Holowaychuk
5eb53a7f7a add docs for .throw() additions 2013-12-20 15:34:48 -08:00
Mathieu Gallé-Tessonneau
bf3e155d4b fix typo 2013-12-20 11:10:31 +01:00
Hugh Kennedy
098dac5a59 Fix typo
s/requivalent/equivalent/g
2013-12-20 11:23:29 +11:00
superchink
10ea872065 Fix typo of "middleware" in index.md
Originally submitted pull request to wrong repo; sorry!
2013-12-19 14:28:31 -08:00
TJ Holowaychuk
d87af72f21 docs 2013-12-19 13:38:51 -08:00
Jonathan Ong
2f4163f6e6 docs app: some copy changes and typo fixes 2013-12-18 23:56:26 -08:00
Jonathan Ong
0c024c48a8 docs response: fix redirect for correctness
do we want to check if the body is already set?
2013-12-18 23:51:51 -08:00
Jonathan Ong
e00f2aee9d docs response: fix md list jank 2013-12-18 23:48:45 -08:00
Jonathan Ong
039805265f docs request: typo 2013-12-18 23:47:48 -08:00
TJ Holowaychuk
0e4545c03b docs 2013-12-18 22:45:33 -08:00
TJ Holowaychuk
4923688944 docs: explain middleware cascading a bit
hopefully this sort of makes sense, need that gif fixed
2013-12-18 22:41:27 -08:00
TJ Holowaychuk
c132b83bc9 docs: add context example 2013-12-18 20:35:38 -08:00
TJ Holowaychuk
0ae852be03 Merge branch 'master' of github.com:koajs/koa 2013-12-18 20:24:49 -08:00
TJ Holowaychuk
c1ed85361b add hello world and app intro
meh not a fan of what im writing today but gotta get this thing out
2013-12-18 20:24:41 -08:00
TJ Holowaychuk
c55ef32978 docs: move app.listen() stuff lower 2013-12-18 20:12:12 -08:00
Jonathan Ong
e83e0022dd docs context: fix markdown jank
breaks your styling, but your markdown styling creates bad list outputs
2013-12-18 01:31:33 -08:00
Jonathan Ong
6b33d4d1ae docs context: throw defaults to 500 2013-12-18 01:30:27 -08:00
TJ Holowaychuk
97a3d84ec9 docs 2013-12-17 23:53:58 -08:00
TJ Holowaychuk
dc20952996 remove some awkward docs
reads bad on the site
2013-12-17 23:50:19 -08:00
TJ Holowaychuk
4c2410d19c docs 2013-12-17 23:47:14 -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  and 
2013-11-28 00:13:16 -08:00
TJ Holowaychuk
8e10f12d38 add ctx.remove() and res.remove(). Closes 2013-11-24 05:06:35 -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
9d7dd437d7 context delegates: response.lastModified and response.etag
only doing setters because i think getters would be pretty confusing.
2013-11-20 14:09:49 -08:00
Jonathan Ong
dc873d66e2 docs: add res.lastModified and res.etag among other things 2013-11-19 22:40:52 -08:00
Jonathan Ong
0362c8e457 add app.keys support 2013-11-15 10:04:07 -08:00
TJ Holowaychuk
c699c75c52 add koa Request / Response objects and delegation. Closes 2013-11-13 09:01:15 -08:00