Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePayloadAndSendHttpRequest ¶
func CreatePayloadAndSendHttpRequest(url string, requestObject interface{}, responsePtr interface{}) (funcError error, statusCode int)
CreatePayloadAndSendHttpRequest creates a JSON payload from a request object and sends an HTTP POST request to the specified URL. The response body is decoded into the responsePtr object.
Parameters:
- url: the URL to send the HTTP POST request to.
- requestObject: the request object to create the JSON payload from.
- responsePtr: a pointer to the response object to decode the JSON response body into.
Returns:
- an error if there was an issue creating the JSON payload, sending the HTTP POST request, or decoding the JSON response body.
- the status code of the HTTP response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.