Commit graph

199 commits

Author SHA1 Message Date
Martin Iwanowski
327b65cb6b Use node 7+ WHATWG parser for hostname, fixes ()
* Use node 7+ WHATWG parser for hostname, fixes 

* 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 2017-06-20 09:57:07 -07:00
designgrill
beec26ebf8 docs: A middleware is always responsible for calling downstream ()
Irrespective of whether it is called by an upstream middleware or not.
2017-06-12 11:38:25 -07:00
Kareem Kwong
0a7856ca15 docs: Add note about overwriting charset in response.type () 2017-06-12 11:37:16 -07:00
Richard Marmorstein
7941fb5221 grammar () 2017-06-12 11:36:19 -07:00
Equim
08eb1a20c3 docs: apply Date.now() to all docs () 2017-05-21 23:33:25 +08:00
Shaun Warman
302814e7a3 docs: Fix minor nitpick in documentation () 2017-05-21 13:40:08 +08:00
Francisco Presencia
3bbb74b3ee docs: added note about arrays ()
Added note about arrays being returned as JSON.
2017-04-23 16:17:48 -07:00
Remek Ambroziak
7f3d0765d7 docs: fix documentation to match new http-errors API () () 2017-04-21 21:49:06 +08:00
George Chung
cd5d6a1c37 docs: reorganize "response.status=" section ()
Reference: https://github.com/jshttp/statuses/blob/v1.2.0/src/iana.json
Since koa@2.2.0 depends statuses@1.2.0
2017-04-21 15:50:39 +08:00
Michał Gołębiowski
682d7b484a docs: add the missing next param () 2017-03-20 01:02:21 +08:00
jongleberry
e812339033 docs: create v2 Migration document ()
* Give v2 migration documentation its own document. Incorporate docs from 

* Fix mis-capitalization of Koa

* Remove unnecessary Dependency section

* Hint at koa-convert enabled compatibility

* Add section on constructing with new

* Clarify es6 constructors are used

* Fix varying capitalization

* Restore mistakenly removed Dependency changes section

* v1.x should not receive feature updates

* Add next() to signature, add missing backticks

* docs++
2017-03-07 22:59:42 -08:00
Jeff Moore
188c0968e1 Add Troubleshooting documentation ()
* Move Common Problems wiki documentation to troubleshooting.md

* Fix header levels and TOC linking

* Change header structure, move causes to their own sections

* Fix fragment capitalization

* Add an example for missing await

* Cleanup language due to problem generalization

* Add visibility for troubleshooting

* Fix fragment typo
2017-03-01 15:50:02 -08:00
Ilkka Oksanen
0c28d1f57b Fix async/await babel recommendation 2017-02-26 12:23:42 -06:00
Stéphane Bisinger
909b829ac6 Fix typo 2017-02-26 12:23:11 -06:00
jongleberry
d4b32234ea docs++ 2017-02-25 00:30:11 -06:00
jongleberry
df7b4ff2b8 docs: replace the reference to co
closes 
2017-02-24 23:43:26 -06:00
Amit Portnoy
00156dfec6 remove unused app.name () 2017-02-18 14:01:58 -08:00
Lee Bousfield
152b6d73b7 Fix response.status default value documentation ()
Resolves , also see 
2017-02-18 13:57:45 -08:00
iamchenxin
fabf5864c6 Amend typo, request.is() return null|fasle|string. ()
Modifying the test for `null` from `==` to `===` to make sure it must be `null`.
2016-12-01 18:16:02 +08:00
Malcolm
e3ccdac621 Clarify behavior of ctx.throw in docs () 2016-11-25 11:51:02 +08:00
Ivan Lyons
614b4e1ad7 yield => await () 2016-08-21 21:21:09 -07:00
qingming
2c507d335d fix typo () 2016-06-21 20:01:51 -07:00
Yu Qi
b16d24ecb8 add maxAge and overwrite options to ctx.cookies.set(name, value, [options]). () 2016-05-26 13:31:11 +08:00
jongleberry
e61d54565b docs: add more docs about app.context
references:

- https://github.com/koajs/koa/issues/652
2016-05-14 08:36:50 -07:00
Zack Tanner
808768a597 copy tweaks () 2016-05-13 14:27:18 +08:00
d3v
e0a0d9f7cc fix: v1 artifact "this" reference () 2016-04-20 14:15:11 +08:00
Marceli.no
fd839976e2 Typo
Significant, but insignificant. Feel free to discard this pull request and make the change yourselves :)
2016-04-03 08:41:04 +08:00
PlasmaPower
9c6969755f Correct ctx.assert documentation parameter order 2016-03-26 21:26:09 -06:00
PlasmaPower
efcdd3b93e Docs: v2 error handling is environment independent 2016-03-22 12:22:43 -06: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
Lee Bousfield
1d1698eb85 Update error handling doc to use promises+async 2016-03-12 20:19:55 -07:00
Lee Bousfield
a440425dc2 Add support for headers in errors 2016-03-12 17:46:35 -07:00
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
frank
4b5ef85f29 correct a spelling error : appropriately 2015-11-05 10:13:07 +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
Jonathan Ong
915fa54bab docs: remove performance diff between express
closes 
2015-05-23 20:07:53 -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