Discover Packages
github.com/openimsdk/tools
utils
httputil
package
Version:
v0.0.49-alpha.16
Opens a new window with list of versions in this module.
Published: May 14, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 1 module, 1 package
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
type ClientConfig
type HTTPClient
func (c *HTTPClient) Get(url string) ([]byte, error)
func (c *HTTPClient) Post(ctx context.Context, url string, headers map[string]string, data any, ...) ([]byte, error)
func (c *HTTPClient) PostReturn(ctx context.Context, url string, headers map[string]string, input, output any, ...) error
ClientConfig defines configuration for the HTTP client.
NewClientConfig creates a default client configuration.
type HTTPClient struct {
}
HTTPClient wraps http.Client and includes additional configuration.
NewHTTPClient creates a new HTTPClient with the provided configuration.
Get performs a HTTP GET request and returns the response body.
Post sends a JSON-encoded POST request and returns the response body.
PostReturn sends a JSON-encoded POST request and decodes the JSON response into output parameter.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.