All Versions
10
Latest Version
Avg Release Cycle
97 days
Latest Release
2692 days ago

Changelog History

  • v3.3.2 Changes

    December 04, 2016

    ๐Ÿ”– Version 3.3.2 Release Notes

    What's New in v3.3.2 ?

    • ๐Ÿ“œ Parse ipv6 addresses correctly (Thanks @mattsch)
    • Gzip middleware bug fix (Thanks @darvik80)
    • ๐Ÿ›  Fix microseconds Apache style logging
    • ๐Ÿ›  Fix recorder middleware to record status code only once (Thanks @mgkeen)
    • ๐Ÿ›  Fix CORS bug when Chrome send empty string CORS headers (Thanks @bboozzoo)
  • v3.3.1 Changes

    January 19, 2016

    ๐Ÿ”– Version 3.3.1 Release Notes

    What's New in v3.3.1 ?

    • ๐Ÿ”จ Refactor/add unit tests
    • โœ‚ Remove the ResourceHandler (v2 API) that was marked as deprecated a year ago.
    • Start using the simplifications (gofmt -s)
    • ๐Ÿ“š Minor documentation improvements

    ๐Ÿ†• New third party Middlewares

  • v3.3.0 Changes

    November 28, 2015

    ๐Ÿ”– Version 3.3.0 Release Notes

    What's New in v3.3.0 ?

    • ๐Ÿ‘€ Include charset=utf-8 in the JSON response Content-Type (See issue about Chrome)
    • โž• Add the ability to customize the field name in the error response.
    • โž• Additional HTTP methods shortcuts (Thanks @sebest !)
    • โž• Add error is the parsed JSON payload is empty (Thanks @sebest !)

    ๐Ÿ†• New third party Middlewares

  • v3.2.0 Changes

    May 17, 2015

    ๐Ÿ”– Version 3.2.0 Release Notes

    What's New in v3.2.0 ?

    • ๐Ÿ†• New shortcut methods to create Routes more easily: Get(...), Post(...), Put(...), Delete(...). It also has the benefit to make golint happier. And &Route{...} remains available for any other use case.
    • ๐Ÿ†• New Websocket example. (Thanks @wingyplus !)
    • ๐Ÿ”’ Security fix on the Jsonp Middleware. (Thanks @sebest !)
    • ๐Ÿ“š Documentation improvements
  • v3.1.0 Changes

    March 30, 2015

    ๐Ÿ”– Version 3.1.0 Release Notes

    What's New in v3.1.0 ?

    • A new IfMiddleware that allows to conditionally execute a Middleware at runtime.
    • ๐Ÿ‘ Better error messages when Env variables are missing (Timer, AccessLogApache, and Status Middlewares updated)
    • ๐Ÿ†• New Statsd example
    • ๐Ÿ†• New JWT authentication example
    • ๐Ÿ‘Œ Improved code coverage

    ๐Ÿ†• New Third party Middlewares

  • v3.0.0 Changes

    February 03, 2015

    ๐Ÿ”– Version 3 Release Notes

    What's New in v3

    • ๐Ÿ“ฆ Public Middlewares. (12 included in the package)
    • A new App interface. (the router being the provided App)
    • A new Api object that manages the Middlewares and the App.
    • Optional and interchangeable App/router.

    Here is for instance the new minimal "Hello World!"

    api := rest.NewApi() api.Use(rest.DefaultDevStack...) api.SetApp(rest.AppSimple(func(w rest.ResponseWriter, r \*rest.Request) { w.WriteJson(map[string]string{"Body": "Hello World!"}) })) http.ListenAndServe(":8080", api.MakeHandler())
    

    โšก๏ธ All 19 examples have been updated to use the new API. See here

    ๐Ÿ—„ Deprecating the ResourceHandler

    ๐Ÿ”ง V3 is about deprecating the ResourceHandler in favor of a new API that exposes the Middlewares. As a consequence, all the Middlewares are now public, and the new Api object helps putting them together as a stack. Some default stack configurations are offered. The router is now an App that sits on top of the stack of Middlewares. Which means that the router is no longer required to use Go-Json-Rest.

    ๐Ÿ‘€ Design ideas and discussion See here

    ๐Ÿ‘€ Migration guide See here

  • v2.1.0 Changes

    November 30, 2014

    Main changes

    • ๐Ÿ’… Apache-style access log
    • ๐Ÿ‘Œ Improved timer and recorder middlewares
    • ๐Ÿ†• new JSONP middleware
    • ๐Ÿ‘‰ Make the gzip middleware support streaming responses

    ๐Ÿ’… Apache-style access log

    ๐ŸŒฒ Go-Json-Rest now reuses the well known Apache log formatting syntax to define the access log.

    With this new feature, the user can define his own record format:

    rest.ResourceHandler{ LoggerFormat: "%t %r %s %b", }
    

    or pick a predefined one:

    rest.ResourceHandler{ LoggerFormat: rest.CommonLogFormat, }
    

    0๏ธโƒฃ or just just ignore this field and get a default, development friendly access log.

    ๐ŸŒฒ This is an implementation of a subset of the Apache mod_log_config syntax. Some options are not implemented yet, I expect the support can grow over time.
    ๐ŸŒฒ See http://httpd.apache.org/docs/2.0/mod/mod_log_config.html for reference.
    ๐Ÿ‘€ And See Godoc for the list of supported options and predefined formats: https://godoc.org/github.com/ant0ine/go-json-rest/rest#AccessLogFormat

    ๐Ÿ—„ Note: Compatibility with the existing JSON logging is maintained. This JSON logging feature may be deprecated in the future is favor of a more powerful one. Internally, logMiddleware is replaced by accessLogApacheMiddleware and accessLogJsonMiddleware.

    ๐Ÿ‘Œ Improved timer and recorder middlewares

    • timerMiddleware now populates request.Env["START_TIME"]
    • recorderMiddleware now records request.Env["BYTES_WRITTEN"]
    • โœ… tests have been added to both

    JSONP middleware

    This is a new public middleware that can be instantiated like this:

    handler := rest.ResourceHandler{ PreRoutingMiddlewares: []rest.Middleware{ &rest.JsonpMiddleware{ CallbackNameKey: "cb", }, }, }
    

    ๐Ÿ‘€ See the complete example here: https://github.com/ant0ine/go-json-rest#jsonp

    ๐Ÿ‘‰ Make the gzip middleware support streaming responses

    The gzip Writer is now instantiated once per response, allowing multiple calls to response.Write() or response.WriteJson().
    ๐Ÿ‘€ See the streaming example here: https://github.com/ant0ine/go-json-rest#streaming

  • v2.0.6 Changes

    October 28, 2014
    • ๐Ÿ—„ Deprecate RouteObjectMethod in favor of Method Values
    • ๐Ÿ†• New option to fully disable the access log middleware
    • ๐Ÿ‘Œ support http.Hijacker
    • ๐ŸŽ performance improvements
  • v2.0.5 Changes

    August 04, 2014
    • ๐Ÿ†• New OuterMiddlewares for custom logging and reporting.
    • statsd example
    • api-versioning example
    • public WrapMiddlewares method.
  • v2.0.4 Changes

    July 13, 2014
    • ๐Ÿ†• New "relaxed" placeholder type (notation #paramName) that matches all chars until the first /
    • ๐Ÿ‘Œ Improved and new examples
    • ๐ŸŽ Performance improvements
    • ๐Ÿ“š Documentation improvements