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
1eb0daded98baf02d777876f512bf266fa0e0f47 authored almost 12 years ago
e94447f60162477afb35c309d2281f8b362b68a9 authored almost 12 years ago
At that point the headers have already been written by WriteHeaders.
Need to set them before.
(instead of the standard http.NotFound)
c826c627f286482730ed8a8c46a601e7ffdff89c authored almost 12 years ago
They follow the net/http interface using rest.* objects instead of http.* objects.
And they prod...
(bad copy paste)
80714161bda711a54ba7e370ccce1f9c19ccf69f authored almost 12 years ago489af0106fe85f6bf5ca4fd6101a19fee7007cb0 authored almost 12 years ago
e9018f20b55203030d6f193c03f684e27cc2bb5f authored almost 12 years ago
664b8c2181c5a4c28b12f8ed65e9293b36848570 authored almost 12 years ago
The file started to be a bit long, it's now splited in logical parts.
2d848da3a371274c34c266fa3cdd03bf61563005 authored almost 12 years ago(optional, and disabled by default)
Inspired by the memcached "stats"
GET /.status returns som...
33db2f85cf4fe7fcb8e8f90d7297e0c7fceab19a authored almost 12 years ago52498a93bc8acd9adacb18cca7e3dd9ae61e511d authored almost 12 years ago
3bdc85dee03c60065996a10072b51b3c49894bc2 authored almost 12 years ago
46d32635f485faea585b2f548b87d9affed2b214 authored almost 12 years ago
Simple:
2013/03/01 04:00:11 404 GET /users/0
or JSON:
2013/03/01 04:00:11 {"StatusCode":404,"...
10dd604e2580e12a5af6f50e80fd6e2766095bd0 authored almost 12 years ago... and get the logging more organized.
4e6c9487d1f126f42729c538c436f028b7775173 authored almost 12 years agoThe log record is now written after execution of the user code.
ae96e5bb5b0cd916675b14bd672e36931fa1aa30 authored almost 12 years ago43943240441e0e040fe179cf2bc747e8ed54466b authored almost 12 years ago
3e3ab0de7c5115abcd1d0d8291345cc9e1f8c75f authored almost 12 years ago
d553dbe7ce8b4d2f6d7f9fbd739577516ffce2ef authored almost 12 years ago
Should allow log/syslog use.
6cf37446abd9334d94c33606c93ff480aa2942b9 authored almost 12 years agoe309d425737489de58a7a765aece0275f85cbb21 authored almost 12 years ago
7fcbf3db8bda02648de419c06c99b45561311b53 authored almost 12 years ago
(a lot more to do)
62e4c0e7534c521284cfbdc20512c46bc9c1be11 authored almost 12 years agof9fb0c3a310e05561de95744932077133525ab7f authored almost 12 years ago
420b32959528f07950b74989f3af721046c854c2 authored almost 12 years ago
e44867e17d8851f8eb6c3585ab39d8965a6ba71f authored almost 12 years ago
(need more sophisticated mechanism)
75ede014f05806cd0af7c96b4368868802021ba2 authored almost 12 years agooptionally, and off by default, it includes the stack trace in the response payload.
e4e32f5088710bb5a906d49184ba8fa2510f902d authored almost 12 years ago271b192d51d85cb71e6fcf4995f380392e1c232e authored almost 12 years ago
18d7e188ffd3988850d66383a26a7132d0464e32 authored almost 12 years ago
f9ce0bef7932d232421c9f2dce9fe946dbc71b7c authored almost 12 years ago
00cb2d97d0310138cd8386c98a4089bec50ecbbb authored almost 12 years ago
Instead of this:
handler.SetRoutes(
rest.Route{
"GET",
"/countries/:code",
...
e60ea25db1624f58d5a064fe8597a4aae96a0836 authored almost 12 years ago
3b0e5d4e7dc5b13c128c800ab9a487e9306eeeb4 authored almost 12 years ago
ccbda6b127552955370352ef6b5a37b868479f16 authored almost 12 years ago
a5c980c37090d42511dd48359f36ee743cf9757f authored almost 12 years ago
I'm trying to have all the defaults developement friendly.
e14c288abd62789daca49ce17fa76085a1192bc7 authored almost 12 years ago
By setting this flag to true, transparent gzip compression is enabled
(if supported by the client)
5f4b37741eda2b11ab72afcea6046c7bc8047fe5 authored almost 12 years ago
004407a7c147b2cb9c6c37057e14dffa1e2b2efc authored almost 12 years ago
This allows for future options in the ResourceHandler struct.
The flag EnableGzip is first on my...
c673bb12dca3a3f71729cf1b922d462912cdac4d authored almost 12 years ago
8ee8b5d2765731457a8ba70e849065d8c519ebea authored almost 12 years ago
279bb1e472bcc06544b436783444307a176f62ff authored almost 12 years ago
7f8e82c65660f8e9abecbad93110a23b682b25ca authored almost 12 years ago
26bc675fed1c5d432ce5b223a3df617c4cbf5271 authored almost 12 years ago