ReadQuery binds URL Query to "ptr". The struct field tag is "url". Example: https://github.com/kataras/iris/blob/main/_examples/request-body/read-query/main.go
(ptr interface{})
| 3125 | // |
| 3126 | // Example: https://github.com/kataras/iris/blob/main/_examples/request-body/read-query/main.go |
| 3127 | func (ctx *Context) ReadQuery(ptr interface{}) error { |
| 3128 | values := ctx.getQuery() |
| 3129 | if len(values) == 0 { |
| 3130 | if ctx.app.ConfigurationReadOnly().GetFireEmptyFormError() { |
| 3131 | return ErrEmptyForm |
| 3132 | } |
| 3133 | return nil |
| 3134 | } |
| 3135 | |
| 3136 | err := schema.DecodeQuery(values, ptr) |
| 3137 | if err != nil { |
| 3138 | return err |
| 3139 | } |
| 3140 | |
| 3141 | return ctx.app.Validate(ptr) |
| 3142 | } |
| 3143 | |
| 3144 | // ReadHeaders binds request headers to "ptr". The struct field tag is "header". |
| 3145 | // |
no test coverage detected