Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeResBody ¶
DecodeResBody reads and decodes the JSON body of an HTTP response into a map.
func GetResErrorCode ¶
GetResErrorCode extracts an error code from the response body.
func MockHTTPRequest ¶
func MockHTTPRequest(method string, path string, body interface{}, queryParams ...QueryParam) *http.Request
MockHTTPRequest creates a mock HTTP request with the specified method, path, body, and optional query parameters. It supports both string and JSON bodies.
Types ¶
type QueryParam ¶
Click to show internal directories.
Click to hide internal directories.