Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(url string, headers *Headers) (json.RawMessage, error)
Get sends an HTTP GET request to the specified URL. Applies headers and returns the response body as json.RawMessage. Returns an error if the request or response processing fails.
func Post ¶
Post sends an HTTP POST request with a JSON body to the specified URL. Applies headers and returns the response body as json.RawMessage. Returns an error if the request or response processing fails.
func RespondWithJSON ¶ added in v1.2.1
func RespondWithJSON(Response http.ResponseWriter, StatusCode int, Payload interface{})
RespondWithJSON writes a JSON response to the HTTP response writer. Constructs a standardized server response with payload and success flag. Sets the appropriate headers, status code, and writes the JSON data.
Types ¶
Click to show internal directories.
Click to hide internal directories.