00:05:24  * ocfxjoined
00:06:10  * jblzjoined
00:21:29  * basicdaysquit (Read error: Connection reset by peer)
00:28:47  * csurapquit (Ping timeout: 252 seconds)
00:31:26  * TheAceOfHeartspart
00:34:37  * bmacjoined
00:48:53  * iamdustanjoined
00:55:38  * mhernandez1joined
01:06:42  * iamdustanquit (Ping timeout: 240 seconds)
01:12:57  * mhernandez1quit (Remote host closed the connection)
01:15:55  * jblzquit (Quit: leaving)
01:16:23  * iamdustanjoined
01:27:18  * jblzjoined
01:27:53  * subbyyyquit (Ping timeout: 264 seconds)
01:31:15  * jblzquit (Client Quit)
01:32:16  * jblzjoined
01:32:25  * jblzquit (Client Quit)
01:32:51  * jblzjoined
01:35:26  * bmacquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:06:38  * basicdaysjoined
02:48:14  * joshonthewebquit (Quit: Computer has gone to sleep.)
03:24:27  * subbyyyjoined
03:30:44  * bmacjoined
03:33:09  * jblzquit (Quit: leaving)
03:47:22  * TheAceOfHeartsjoined
03:56:29  * TheAceOfHeartspart
04:00:03  * bmacquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
04:11:11  * iamdustanquit (Ping timeout: 265 seconds)
05:39:31  * basicdaysquit (Quit: I'm out)
06:08:14  * calvinmetcalfquit (Quit: Connection closed for inactivity)
06:12:49  * fundonjoined
07:37:15  * fundonquit (Quit: fundon)
08:10:15  * subbyyyquit (Ping timeout: 276 seconds)
08:24:44  * fundonjoined
08:26:11  * EvanCarrollquit (Ping timeout: 252 seconds)
09:31:33  * L0u1sjoined
10:10:41  * L0u1schanged nick to L0u0s
10:16:19  * shesekjoined
10:17:42  * L0u0schanged nick to L0u1s
10:19:08  * L0u1squit
11:28:22  * iamdustanjoined
11:54:21  * calvinmetcalfjoined
11:56:06  * L0u1sjoined
12:18:43  * iamdustanquit (Ping timeout: 245 seconds)
12:22:40  * joshonthewebjoined
12:48:50  * mhernandez1joined
13:00:24  * bmacjoined
13:05:39  * mhernandez1quit (Remote host closed the connection)
13:07:34  * ramitosjoined
13:11:29  * mhernandez1joined
13:28:46  * jblzjoined
13:51:45  * shesekquit (Ping timeout: 258 seconds)
14:08:16  * L0u1squit
14:10:15  * iamdustanjoined
14:24:58  * iamdustanquit (Ping timeout: 245 seconds)
14:26:47  * EvanCarrolljoined
14:27:26  * LeXXikjoined
14:35:53  * EvanCarrollquit (Ping timeout: 240 seconds)
14:41:20  * iamdustanjoined
15:03:59  * EvanCarrolljoined
15:04:39  * iamdustanquit (Ping timeout: 265 seconds)
15:18:53  * iamdustanjoined
15:43:09  * basicdaysjoined
15:47:47  * csurapjoined
15:50:48  * yanickjoined
15:50:51  * yanickpart
15:51:08  * yanickjoined
15:52:50  <yanick>if I'm using koa-trie-router and I'd like to route based on accept content type, what are my options?
15:54:05  <yanick>for example, requesting "GET /user" returns the current session's user profile as HTML. If I'm requesting the same URL, but with the header "accept: application/json", how could I neatly return the JSON data for the user instead?
16:03:58  * oscargodsonjoined
16:05:22  <LeXXik>I think you can check this.header and then this.body = yield this.render('my-html-page') or this.body = my-response-json
16:05:36  <LeXXik>yanick:
16:06:24  * oscargodsonquit (Client Quit)
16:11:54  <LeXXik>yanick: I usually try to avoid allowing different requests to match the same route, though
16:11:59  * jblzquit (Quit: leaving)
16:12:07  * joshonthewebquit (Quit: Computer has gone to sleep.)
16:13:05  * iamdustanquit (Ping timeout: 240 seconds)
16:35:43  * mhernandez1quit (Remote host closed the connection)
16:42:12  * 17SAAEGVSjoined
16:45:32  <yanick>LeXXik, perhaps, but routes already work that way : app.route('/user').get(getFn).post(postFn).put(putFn).... so the argument is mixed here, no?
16:46:15  <yanick>LeXXik, also, allowing different content responses for the same URI / method allows for device specific requests regardless of the application configuration
16:47:21  <yanick>LeXXik, after all, this is why there's an "accept" header
16:57:08  * jblzjoined
16:57:35  * jblzquit (Client Quit)
16:58:18  * jblzjoined
16:59:32  * jblzquit (Client Quit)
17:00:11  * jblzjoined
17:00:18  * jblzquit (Client Quit)
17:02:28  * jblzjoined
17:06:22  * jblzquit (Client Quit)
17:19:19  * oscargodsonjoined
17:21:17  * oscargod_joined
17:23:46  * oscargodsonquit (Ping timeout: 258 seconds)
17:43:40  * oscargod_quit (Ping timeout: 265 seconds)
17:47:27  <LeXXik>yanick: yes, you are right, the routes can be chained this way
17:49:40  <LeXXik>yanick: and you would be absolutely correct setting your this.body in your .get(getFn) based on your content response
17:50:44  <yanick>LeXXik, I just found out koa's accept method : this.request.accept.types('json', 'html') will return 'json' if requesting 'application/json' or 'html' otherwise
17:50:58  <LeXXik>yanick: it's simply my own preference to separate the routes, e.g. .get('html').get('json')
17:51:28  <yanick>LeXXik, so, basically : var acceptType = this.request.accept.types('json', 'html'); ... if (acceptType === 'json') { return json; } else { return html; }
17:53:08  <LeXXik>yanick: looks good :)
18:08:00  * subbyyyjoined
18:14:40  * oscargodsonjoined
18:23:06  * jblzjoined
18:39:58  * 17SAAEGVSquit (Remote host closed the connection)
18:41:06  * mhernandez1joined
19:25:15  * oscargodsonquit (Ping timeout: 258 seconds)
19:47:40  * ramitosquit (Remote host closed the connection)
19:48:10  * ramitosjoined
19:50:26  * oscargodsonjoined
20:03:16  * fundonquit (Quit: fundon)
20:10:04  * niftylettuce_joined
20:33:27  * jblzquit (Quit: leaving)
20:36:57  * mhernandez1quit (Remote host closed the connection)
20:41:03  * sxjoined
20:44:48  * piscisaureusjoined
20:47:04  * jblzjoined
20:53:15  * jongleberryquit (Ping timeout: 250 seconds)
20:54:47  * mhernandez1joined
20:56:04  * jongleberryjoined
21:09:21  * mhernandez1quit (Remote host closed the connection)
21:09:45  * mhernandez1joined
21:10:24  * mhernandez1quit (Remote host closed the connection)
21:12:15  * avdiquit (Ping timeout: 252 seconds)
21:12:28  * rickharrison_quit (Ping timeout: 265 seconds)
21:12:57  * niftylettuce_quit (Ping timeout: 265 seconds)
21:13:07  * ehdquit (Ping timeout: 240 seconds)
21:13:21  * spalgerquit (Ping timeout: 252 seconds)
21:13:31  * calvinmetcalfquit (Ping timeout: 240 seconds)
21:13:40  * shesekjoined
21:22:59  * jonglebe_joined
21:23:18  * niftylettuce_joined
21:23:22  * avdijoined
21:24:23  * jongleberryquit (Ping timeout: 255 seconds)
21:24:58  * LeXXikquit (Ping timeout: 240 seconds)
21:25:17  * jongleberryjoined
21:26:56  * rickharrison_joined
21:27:05  * spalgerjoined
21:27:32  * jonglebe_quit (Ping timeout: 258 seconds)
21:28:47  * ehdjoined
21:30:59  * calvinmetcalfjoined
21:48:17  * csurapquit (Ping timeout: 240 seconds)
22:09:15  * TheAceOfHeartsjoined
22:09:52  * TheAceOfHeartspart
22:10:24  * jblzquit (Quit: leaving)
22:16:01  * piscisaureuschanged nick to O-O
22:16:27  * O-Ochanged nick to O--O
22:24:17  * niftylettuce_quit (Quit: Connection closed for inactivity)
22:30:05  * O--Oquit (Ping timeout: 255 seconds)
22:37:44  * TheAceOfHearts1joined
22:38:15  * calvinmetcalfquit (Quit: Connection closed for inactivity)
22:38:47  * TheAceOfHearts1part
22:39:55  * bmacquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:41:54  * csurapjoined
23:14:14  * joshonthewebjoined
23:26:05  * piscisaureusjoined