Documentation
¶
Overview ¶
Package client provides a simple, generic HTTP client for sending GET and POST requests to external APIs, which is used by other link-specific Ovid packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPRequest ¶
func HTTPRequest(ctx context.Context, httpMethod, u, authToken string, queryOrJSONBody any) ([]byte, error)
HTTPRequest sends an HTTP GET or POST request to an external API. For GET requests, the queryOrJSONBody parameter is expected to be url.Values. For POST requests, it should be any struct that can be encoded as JSON. Some errors (failure to construct a request or decode a response body) are returned as non-retryable temporal.ApplicationErrors.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.