mirror of
https://github.com/kataras/iris.git
synced 2026-01-10 05:25:58 +00:00
add a 'Context.SetLanguage', similar to pp.I18n.ExtractFunc but it can be used per-handler
relative: https://github.com/kataras/iris/issues/1502#issuecomment-623553034 Former-commit-id: 7e2fadeb60149f43edbb9e220b0274ce1160881b
This commit is contained in:
@@ -394,7 +394,8 @@ Other Improvements:
|
||||
|
||||
New Context Methods:
|
||||
|
||||
- `Context.ServeContentWithRate`, `ServeFileWithRate` and `SendFileWithRate` methods to throttle the "download" speed of the client.
|
||||
- `Context.SetLanguage(langCode string)` force-sets a language code from inside a middleare, similar to the `app.I18n.ExtractFunc`
|
||||
- `Context.ServeContentWithRate`, `ServeFileWithRate` and `SendFileWithRate` methods to throttle the "download" speed of the client
|
||||
- `Context.IsHTTP2() bool` reports whether the protocol version for incoming request was HTTP/2
|
||||
- `Context.IsGRPC() bool` reports whether the request came from a gRPC client
|
||||
- `Context.UpsertCookie(*http.Cookie, cookieOptions ...context.CookieOption)` upserts a cookie, fixes [#1485](https://github.com/kataras/iris/issues/1485) too
|
||||
|
||||
Reference in New Issue
Block a user