Commit Graph

32 Commits

Author SHA1 Message Date
Sdogruyol 8331beceef Move Crystal core classes to ext 2017-03-04 00:01:26 +03:00
Serdar Dogruyol cc44710654 Remove session & csrf from core (#259)
Remove session & CSRF
2016-11-24 16:47:30 +04:00
sdogruyol 3b9a3f84ab Treat HTTP::Request body as IO. Fixes #257 2016-11-24 12:07:39 +03:00
sdogruyol 1b27f5c011 Add Int64 type to context store 2016-10-24 16:12:29 +03:00
Sdogruyol d11b702ee4 More docs 2016-07-17 14:26:22 +03:00
Sdogruyol 09d82ed74b Add context store 2016-07-14 21:56:01 +03:00
Mike Perham 94db0c8cb8 Implement basic in-memory session store
Sessions are stored in a non-persistent Hash.  Only String values are allowed.  A reaper fiber regularly removes any sessions which expire due to inactivity.
2016-06-27 14:37:40 -07:00
sdogruyol f92d812c32 Format 2016-06-15 08:58:14 +03:00
sdogruyol b3ebf40201 Cache request url_params 2016-05-21 15:03:34 +03:00
sdogruyol 05e44e68c6 Updating to instance types 2016-04-12 14:41:09 +03:00
Fatih Kadir Akın 043d1c8aa2 Add memoization to lazy param parsing 2016-03-07 11:21:37 +02:00
Fatih Kadir Akın 53d12534b7 Remove ParamContainer abstraction to make it faster. 2016-03-06 21:43:13 +02:00
Fatih Kadir Akın 8267ffe2c5 Upgrade ParamParser to make it more convinient.
It now decouples `env.params` to `env.params.query`, `env.params.body`,
`env.params.json` and `env.params.url` and you still can access merged
values using `env.params.all`
2016-03-06 13:22:24 +02:00
Joris Moriau 8f6b00ba55 decoupled-urlparams-from-routehandler 2016-02-19 12:45:25 +01:00
sdogruyol 5a58ee3cbb Format code 2016-02-17 11:52:13 +02:00
Joris Moriau c5201f01ad added verb for filters and minor improvements 2016-02-17 10:34:01 +01:00
TSUYUSATO Kitsune 0f86e59db6 Cache Context#params result 2016-02-10 02:11:18 +09:00
TSUYUSATO Kitsune 55361b3c9a Use 302 to redirect instead of 301
`301` means "Moved Permanently", so browser caches this redirect, it is used when changing server URL.
`302` means "Found", it is used generally (e.g. redirect top page after
login).

Each of `301`, `302`, `303` and `307` means redict, but they are
different. We could choice those status in case.
2016-02-10 00:28:07 +09:00
Sdogruyol 17f944ef9d Move redirect macro to context def 2016-01-24 12:52:41 +02:00
Sdogruyol d1f95c0f39 All specs passing except macros 2016-01-24 12:22:25 +02:00
Sdogruyol 0b4a36953f Started reimplementing router 2016-01-12 21:37:12 +02:00
Sdogruyol 8b6700695d Update delegate macro in context 2015-12-27 11:17:22 +02:00
Imran Latif 4d1e31cb41 Removed env from redirect and changed redirect from method to macro.
Removed `env.redirect` in-favor of `redirect` in-order to make Kemal's
API look more like Sinatra.

Thanks @sdogruyol and @f for introducing me to macros :-).

Binding HTTP::Server to 0.0.0.0
2015-12-10 01:24:49 +05:00
Imran Latif cd69a866d5 Adding method for doing browser redirection from inside any route.
Made some small changes
2015-12-05 02:23:18 +05:00
Sdogruyol a7cc498dca Refactored context 2015-10-30 22:34:44 +02:00
Sdogruyol 4ce1bc908f Added response and headers 2015-10-30 22:01:18 +02:00
Serdar Dogruyol ffdaecace4 Added headers to context 2015-10-30 17:06:25 +02:00
Sdogruyol 5892d900ff Added documentation for context, param_parser and route 2015-10-29 17:16:29 +02:00
Sdogruyol 1c53321026 Changed default content-type to text/html 2015-10-28 21:55:17 +02:00
Sdogruyol 5376eb8bb2 Added context specs 2015-10-28 20:52:34 +02:00
Sdogruyol a8ad95aa67 Removing redundant code 2015-10-28 18:09:45 +02:00
Sdogruyol 5ca84fea4c Renamed all occurrences to Kemal 2015-10-23 21:33:26 +03:00
Renamed from src/frank/context.cr (Browse further)