Documentation
¶
Index ¶
- func DecodeJSON(r io.Reader, target interface{}) error
- func EncodeJSON(w io.Writer, data interface{}) error
- func ParseJSONResponse(resp *http.Response, target interface{}) error
- func ReadResponseBody(resp *http.Response) (string, error)
- func SendJSONRequest(method, url string, payload interface{}, headers map[string]string) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSON ¶
DecodeJSON decodes JSON data from the provided reader into the given target.
func EncodeJSON ¶
EncodeJSON encodes the given data to JSON and writes it to the provided writer.
func ParseJSONResponse ¶
ParseJSONResponse parses the JSON body of an HTTP response into the given target.
func ReadResponseBody ¶
ReadResponseBody reads the body of an HTTP response and returns it as a string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.