Ecosyste.ms: OpenCollective
An open API service for software projects hosted on Open Collective.
github.com/casbin/go-json-rest
A quick and easy way to setup a RESTful JSON API
https://github.com/casbin/go-json-rest
2533a66fc2ffaf50bb20f4788dbedbbd24526c3b authored almost 11 years ago by antoine <[email protected]>
206d88886a28bef5c1870367900745d81d8d2df1 authored almost 11 years ago by antoine <[email protected]>
c9fa83465c8b1069a367c0dfd51360f01579f10d authored almost 11 years ago by antoine <[email protected]>
The ResponseWriter provided by the server implementation of net/http
has a Flush() method. This ...
2ebc7140749543779a5cbdb1a1d325615330532d authored almost 11 years ago by antoine <[email protected]>
ec2b3ec862baa5c05ed3112cafebabe2f7832112 authored almost 11 years ago by antoine <[email protected]>
300af0d31833f19ef1bbf569eaddc643b10df2b5 authored almost 11 years ago by antoine <[email protected]>
38ef40eaa0aac53a8741e075c6543f4d1291caff authored almost 11 years ago by antoine <[email protected]>
a6396a924a69ca86f6ea7c5318b2ce8f1da7d3a1 authored about 11 years ago by antoine <[email protected]>
04fc8017d6ba0b367ee2e581d4da6806082f718a authored about 11 years ago by antoine <[email protected]>
41a0914366bd609c1392964fd6fdd41af2a021bd authored about 11 years ago by antoine <[email protected]>
112b837b0c4d6748be1eb7ebe9c0ad791232e6e6 authored about 11 years ago by antoine <[email protected]>
9c44224db08cfa0f4a9981d37e265f323e50f6e3 authored about 11 years ago by antoine <[email protected]>
6c1d96af9ab93634ef182e6fb7edffbf0c061983 authored about 11 years ago by antoine <[email protected]>
2a4ec9e48068a3be89e9b3c3f6955a1bffa02c10 authored about 11 years ago by antoine <[email protected]>
Allow lowercase charset "utf-8"
d6a6131e82caf5d4d5a744c5e4b3136cadef251c authored about 11 years ago by Antoine Imbert <[email protected]>2d60eea38f3d7d23e13f405533d8977b777680d1 authored about 11 years ago by suin <[email protected]>
460974419b715cb7e966209ca78b13c24e17019b authored about 11 years ago by antoine <[email protected]>
10ed59c1bb069c589eccd307717eca1b46fe3c54 authored about 11 years ago by antoine <[email protected]>
da2a6733d66a38a8a2141d551c57e645c19d9d06 authored over 11 years ago by antoine <[email protected]>
The WriteHeader method of the "recorder" middleware was called before the
Write method of the "g...
instead of 'application/json; charset=UTF-8'
dc86f5265f68c5a847477045cc0a58d4ec964753 authored over 11 years ago by antoine <[email protected]>Don't die if a charset param exists along w/ mediatype
69f3748998ec46580703a494acaaa3f80381e51a authored over 11 years ago by Antoine Imbert <[email protected]>
`application/json; charset=UTF-8` would fail despite being what the library
implicitely expects....
178a01017a594a4f56837b3927e26cad65c1601f authored over 11 years ago by antoine <[email protected]>
fcb3dfd11c5b322d8b9b994c589c6705eda9b5d3 authored over 11 years ago by antoine <[email protected]>
7cee177133aea3c038f7b1dcb8714619b8c999b5 authored over 11 years ago by antoine <[email protected]>
6210890ee26a5a4b2d2466e10ba3c2ab470bdb26 authored over 11 years ago by antoine <[email protected]>
this hides the stack trace and make the test output more useful
ceb15560859b1eb036c5c88164bf113a40fa256a authored over 11 years ago by antoine <[email protected]>Middleware refactor
127ab84b4b02063ad4ef9a1b481351c22d297e39 authored over 11 years ago by Antoine Imbert <[email protected]>fae56342c3dc40ad1a0967332b7b1e3b65f05b2c authored over 11 years ago by antoine <[email protected]>
9530b2c5d0d4203bd7e06a91726d5990b6ddc310 authored over 11 years ago by antoine <[email protected]>
2a24df83b15f08539ac3ecfa386009a12df0c72b authored over 11 years ago by antoine <[email protected]>
c1bb041bdedb95e6af9084d89fb5c0cd6190baac authored over 11 years ago by antoine <[email protected]>
... using internal (private) middlewares.
aab4995b4eaf6539a8d9af2f96fcece6990b9041 authored over 11 years ago by antoine <[email protected]>9b270e4d7a349bcc246e89ccfd4dd15b5c7db4c4 authored over 11 years ago by antoine <[email protected]>
This way the "curl" commands are shorter to type.
7c2b4bd4568f0840f96831067982059a6d326b74 authored over 11 years ago by antoine <[email protected]>c4a3db61300a56936aae4119b2b658447fef4df3 authored over 11 years ago by antoine <[email protected]>
335ad27fc194604777425f9949875980c4d75756 authored over 11 years ago by antoine <[email protected]>
Harden the router for edge cases: duplicated :id in the same route or across equivalent TRIE nodes
d7d8dcfd18802f70719d6471abc0158aaad9a672 authored over 11 years ago by Antoine Imbert <[email protected]>
/r/:id/o/:id is invalid, rather than fail hard at request time, the router
now bails when the ro...
Routes of the form:
/r/:id
/r/:key/other
Should be written
/r/:id
/r/:id/other
...
31f23caa2f30bb8f3105de421ff08ad773dd6482 authored over 11 years ago by antoine <[email protected]>
By default the Content-Type is now validated, and the option
EnableRelaxedContentType can be set...
bd70887dce5822307db9cdd79668794801b22b73 authored over 11 years ago by antoine <[email protected]>
aa4b9394938dc66c5102f2016a69c49e0f4ea5ed authored over 11 years ago by antoine <[email protected]>
ffb76f0b8da63b88d474509edc7dad23cfef6677 authored over 11 years ago by antoine <[email protected]>
f9e9207fc7f81be7edfe2cf9000a9e9cc0db6978 authored over 11 years ago by antoine <[email protected]>
That way, regarless of how is written the Route and how is written
the Find query, the router en...
c1244957665b363be12478af45ae2f6084ad8d66 authored over 11 years ago by Antoine Imbert <[email protected]>
35734651ed3059964f8771a8ea4bf6d99c7b06ba authored over 11 years ago by Antoine Imbert <[email protected]>
9121bfc0b038cef60511c3e89166ab4a7078134f authored over 11 years ago by Antoine Imbert <[email protected]>
098da730ddbac865eb4646781b7e5e8501b3ca84 authored over 11 years ago by antoine <[email protected]>
Extract the utility functions used to write the handler tests to a
dedicated package. Users of t...
f69c66457493fc5b8a2b99b17aeab37c1f2e622d authored over 11 years ago by antoine <[email protected]>
f6287f3f362e0f3348d35b344794dedf57d88ba8 authored over 11 years ago by antoine <[email protected]>
40cf9673caba1ff2c396245cf64b0cc5b063a284 authored over 11 years ago by antoine <[email protected]>
56e53420efa5088127ce8a4d938583de3da5d731 authored over 11 years ago by antoine <[email protected]>
1ca50da87d3a5c88c419622ed94a6fdfd7a24721 authored over 11 years ago by antoine <[email protected]>
Will be useful to return 405.
f08fb5fc4ccc6a14f4e81ace84fc8d52d6200bb6 authored over 11 years ago by antoine <[email protected]>... are not directly tied to the recursive method.
5db830256eacd4b00d1d9eb9e18da4d047d58bd6 authored over 11 years ago by antoine <[email protected]>(this returns only the params, not the full context)
0fa46edf933ed4307a41fe38f3cefdef6bb8db55 authored over 11 years ago by antoine <[email protected]>demondtrate a custom Find* method, and will be useful for routing introspection.
a3a639e8e30237c9337e0b8a4db3fe71adde28d5 authored over 11 years ago by antoine <[email protected]>
The find method is now able to execute an arbitrary function when
a match is found. (A match on ...
bf9077698da3cc6cf9675448f4d78255c17216a3 authored over 11 years ago by antoine <[email protected]>
e25a6c8498b9692e73df29c6929e37c9cc160d42 authored over 11 years ago by antoine <[email protected]>
6bb7c5e80a09aff75920fd27b5ee88d07bccfa9c authored over 11 years ago by antoine <[email protected]>
ecd3d37dc87d24927f72f95d5f7ddcd9e1543e95 authored over 11 years ago by antoine <[email protected]>
8de84cd096669f3b9e7f10cb4aebc8403af72030 authored over 11 years ago by antoine <[email protected]>
...and save a useless for loop
7df38cb57cb0006f1217c424e98ddb820d370cfe authored over 11 years ago by antoine <[email protected]>fb20d1a778baf7f7638dc893c63a834e61b781fc authored over 11 years ago by antoine <[email protected]>
fae60011e9e4d77e3caa99aa2add935e1cca2899 authored over 11 years ago by antoine <[email protected]>
30ccfbcb66d91db7126f9c36035c49ca1935264b authored over 11 years ago by antoine <[email protected]>
97bad1bfb07cbd8ba7fe851a8dd007ea6ef28511 authored over 11 years ago by antoine <[email protected]>
Helpers for creating URIs
4c28d888b18b67fdf11a6faf6628c2b3da4e75c0 authored over 11 years ago by Antoine Imbert <[email protected]>UriForWithParams.
The argument "parameters" was a hash of string, but since a query string
can c...
Instead of one router per method, there is now one router that is
HTTP Method aware (thanks to t...
The leaf nodes now contain a map of HTTP methods to the Routes.
The Recursive findRoute method h...
03d41bff5c80596dc404f168fd25d0b7c598709f authored over 11 years ago by Franck Cuny <[email protected]>
The three added functions allow an easier creation of URLs. This can be
useful when, in the app...
4743ee45e0d5654a9a7a8f65bd46863ae19ef3de authored over 11 years ago by antoine <[email protected]>
441ca9cae25dbdf2b886fdd98d95f0d273af44f2 authored over 11 years ago by antoine <[email protected]>
9f47ce631ec65de65093df71e20f5cf860dd265f authored over 11 years ago by antoine <[email protected]>
504646ad0d5bc6b93b745fb798468fe9771a1087 authored over 11 years ago by antoine <[email protected]>
50769028cc325126453aba54e78f9ce4d3e1ef2b authored over 11 years ago by antoine <[email protected]>
That makes it clear that Route is not necessary a rest.Route.
I expected this value to become a ...
This is big change, it does not change the API, but will allow
more improvements in the future....
don't use append when the size of the slice is known in advance.
9db59ab2669391293f83d668926884835ede710a authored almost 12 years ago by antoine <[email protected]>
Instead of concatenating the http method and the path,
maintain one router per method.
This keep...
dc75cba892ded0ea384634bc9df9971e78edc190 authored almost 12 years ago by antoine <[email protected]>
fdadeb5884d6bf5dd07f170117466d0507f386b7 authored almost 12 years ago by antoine <[email protected]>
5238dec4f2b686987c48af797340569be979bca7 authored almost 12 years ago by antoine <[email protected]>
Make sure that the response code is recorded when Gzip is enabled.
Add unit test.
Fix Content-Encoding header on gzip responses
101493dda60eb19c401717993ff8b3f3c8ba1876 authored almost 12 years ago by Antoine Imbert <[email protected]>994f6d36ca16b34aac00638050a87cfb605f57f2 authored almost 12 years ago by Ask Bjørn Hansen <[email protected]>
(the examples dirs are annoying. Is there an option to not build everything recursively ?)
95685ea180b2276c69701a14b6a51e22b938d296 authored almost 12 years ago by antoine <[email protected]>a0e86e326db6f0833195dcec29975e32164f1e5d authored almost 12 years ago by antoine <[email protected]>
This will be consistent with most of the JSON output given the
default of json.Marshal.
424274d554fb36ccedb30cbd9294dccfcf1bd3c0 authored almost 12 years ago by antoine <[email protected]>
7044a036504629b8d9d2597e9b5fa45ba8478d2a authored almost 12 years ago by antoine <[email protected]>