Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Latest commit

 

History

History
78 lines (68 loc) · 2.76 KB

CHANGELOG.md

File metadata and controls

78 lines (68 loc) · 2.76 KB

Change Log

under development

  • Context.Error, Context.NotFound, Context.Redirect, Context.ServeFile, Context.ServeContent return a nil error.
  • Context.Error(msg string, code int) was changed as Context.Error(code int, msg string).
  • Context.Redirect(url string, code int) was changed as Context.Redirect(code int, url string).

v1.12.1 May 5, 2020

  • Remove Router.paramsPool.

v1.12.0 May 4, 2020

  • Add Skipper.
  • Add PathSkipper.
  • Add IRouter.Any: registers a new request handler function that matches any HTTP methods.
  • Add Context.SetHeader: a shortcut of http.ResponseWriter.Header().Set.

v1.11.0 April 15, 2020

  • Add Map: an alias of map[string]interface{}.
  • Add Decoder, Router.Decoder and Context.Decode for decoding request's input.
  • Add Context.Stringf.

v1.10.0 April 11, 2020

  • Move contextPool out from router.
  • Add middlewareStatePool.
  • Add Context.DefaultQuery.
  • Router.ServeFiles accepts route options.
  • Add Context.ServeFile: a shortcut of http.ServeFile.
  • Add Context.ServeContent: a shortcut of http.ServeContent.
  • Add Context.BasicAuth: a shortcut of http.Request.BasicAuth.
  • Add Context.SendFile: sends a file to browser.

v1.9.0 April 4, 2020

  • Add Context.JSON to send JSON response.
  • Add Context.String to send string response.
  • Add Context.XML to send XML response.
  • Content.SetContentTypeJSON and Content.SetContentTypeXML append charset=utf-8 to content type header.
  • Add Context.HTML to send HTML response.
  • Add Context.Cookie and Context.Cookies.
  • Add Context.FormValue.
  • Add Context.PostFormValue.
  • Add Context.QueryString.
  • Add Context.QueryParams and Context.QueryParam.
  • Add Context.JSONP and Context.JSONPCallback.
  • Add Context.Render to render a template.
  • Add Context.RouteURL to generate URL of the naming route.
  • Add Context.Emit and Context.Blob.
  • Add Context.HtmlBlob.
  • Add Context.XMLBlob.
  • Add Context.JSONBlob.
  • Add Context.JSONPBlob and Context.JSONPCallbackBlob.
  • Add RecoveryLogger.

v1.8.1 April 2, 2020

  • Fix WrapHH doesn't returns the error of final handle.

v1.8.0 April 2, 2020

  • Add Context.GetHeader, a shortcut of http.Request.Header.Get.
  • Add WrapH to wrap a HTTP handler as a middleware.
  • Add WrapHH to wrap func(http.Handler) http.Handler as a middleware.

v1.7.0 March 30, 2020

  • Add Context.WriteHeader, an alias of http.ResponseWriter.WriteHeader.
  • Add Context.IsAJAX to determine whether it is an AJAX request.
  • Write error to log.

v1.6.1 March 24, 2020

  • Bug #21 Fix the call sequence of middleware.