Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSON ¶
DecodeJSON decodes JSON data from the provided io.Reader into the given value.
func New ¶
New creates and returns a new HTTP client with the provided context. It initializes and returns a new clientV2 pointer with an embedded http.Client pointer, an empty request pointer, and the provided context.
func NewClient ¶
NewClient creates a new HTTP client with the given context. It initializes and returns a new client pointer with an embedded http.Client pointer, an empty request pointer, and the provided context.
func UnmarshalJSON ¶
UnmarshalJSON parses the JSON-encoded data and stores the result in the value pointed to by v.
Types ¶
type JSON ¶
type JSON map[string]interface{}
JSON represents a JSON object.
type QueryParam ¶
type QueryParam struct { Key string // The key of the query parameter. Value any // The value of the query parameter. }
QueryParam represents a single key-value pair for query parameters.
type RequestOpts ¶
type RequestOpts struct { Headers []Header Body io.Reader QueryParams []QueryParam }