Documentation
¶
Index ¶
- func AppendHeaderOptions(opts []option.RequestOption, headers map[string]string) []option.RequestOption
- func GetJSON(ctx context.Context, url string, headers map[string]string, timeoutSecs int) ([]byte, int, error)
- func MergeHeaders(base, override map[string]string) map[string]string
- func PostJSON(ctx context.Context, url string, headers map[string]string, payload any, ...) ([]byte, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendHeaderOptions ¶
func AppendHeaderOptions(opts []option.RequestOption, headers map[string]string) []option.RequestOption
AppendHeaderOptions appends non-empty header values as OpenAI request options.
func GetJSON ¶
func GetJSON(ctx context.Context, url string, headers map[string]string, timeoutSecs int) ([]byte, int, error)
GetJSON sends a GET request with the given headers and returns the response body.
func MergeHeaders ¶
MergeHeaders merges override headers into base, returning a new map.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.