Documentation
¶
Overview ¶
Package jsonprobe inspects JSON request bodies for reference backend servers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasJSONBool ¶
HasJSONBool reports whether a request contains an exact boolean key/value.
func HasJSONKey ¶
HasJSONKey reports whether a request contains a key at any JSON object depth. It deliberately ignores quoted text and malformed payloads.
func HasJSONNumber ¶
HasJSONNumber reports whether a request contains an exact numeric key/value pair at any JSON object depth. It prevents fixture controls from matching user text or quoted numeric values.
func TryWriteForcedHTTPError ¶
func TryWriteForcedHTTPError(w http.ResponseWriter, status int, retryAfter string, body string, defaultBody func(int) string) bool
TryWriteForcedHTTPError writes a forced HTTP error if status is non-zero. If it returns true, the caller should return and stop processing.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.