1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

add iris.IsErrEmptyJSON helper. See HISTORY.md

This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-06-16 13:52:39 +03:00
parent f9e027cb86
commit 6d3884b0ce
4 changed files with 48 additions and 2 deletions

View File

@@ -496,6 +496,10 @@ var (
// A shortcut for the `context#CookieEncoding`.
CookieEncoding = context.CookieEncoding
// IsErrEmptyJSON reports whether the given "err" is caused by a
// Context.ReadJSON call when the request body
// didn't start with { or it was totally empty.
IsErrEmptyJSON = context.IsErrEmptyJSON
// IsErrPath can be used at `context#ReadForm` and `context#ReadQuery`.
// It reports whether the incoming error is type of `schema.ErrPath`,
// which can be ignored when server allows unknown post values to be sent by the client.