MCPcopy Create free account
hub / github.com/kataras/iris / Query

Function Query

middleware/methodoverride/methodoverride.go:150–156  ·  view source on GitHub ↗

Query specifies a url parameter name to use to determinate the method to override the POST methos with. Example URL Query string: http://localhost:8080/path?_method=DELETE Defaults to: "_method".

(paramName string)

Source from the content-addressed store, hash-verified

148//
149// Defaults to: "_method".
150func Query(paramName string) Option {
151 getter := func(w http.ResponseWriter, r *http.Request) string {
152 return r.URL.Query().Get(paramName)
153 }
154
155 return Getter(getter)
156}
157
158// Only clears all default or previously registered values
159// and uses only the "o" option(s).

Callers 1

NewFunction · 0.70

Calls 3

GetterFunction · 0.85
GetMethod · 0.65
QueryMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…