Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSuperfluousURLArgs ¶
CheckSuperfluousURLArgs allows checking for presence of supported only arguments in URL. It returns first error it encounters.
func ClientIP ¶ added in v0.2.8
ClientIP tries to capture actual remote client IP address even if the client communicates with proxy servers. Please note that the "forwarded" HTTP header is not supported.
In case nothing is found, nil is returned.
func GetURLBoolArgOrFail ¶ added in v0.3.12
GetURLBoolArgOrFail reads a string-encoded bool argument (= '1', '0') from URL query. If not set, then `dflt` is returned (i.e. value not present is considered a non-error). The second returned value is an "OK" flag. In case of an error, the function writes a HTTP response and returns false as a second argument.
func GetURLIntArgOrFail ¶ added in v0.3.12
GetURLIntArgOrFail reads a string-encoded integer argument from URL query. If not set, then `dflt` is returned (i.e. value not present is considered a non-error). The second returned value is an "OK" flag. In case of an error, the function writes a HTTP response and returns false as a second argument.
Types ¶
This section is empty.