Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶
func New ¶
func New(userAgent *string) *HttpClient
New initializes a new HttpClient with the provided user agent.
userAgent: A pointer to a string containing the user agent. Returns a pointer to a HttpClient.
func (*HttpClient) Get ¶
func (c *HttpClient) Get(link *url.URL) ([]byte, error)
Get retrieves data from the specified URL using an HTTP GET request.
Parameters: - link: A pointer to a url.URL struct representing the URL to send the request to. Returns: - []byte: The response body as a byte slice. - error: An error if the request fails or the response status code is not in the 200-299 range.
Click to show internal directories.
Click to hide internal directories.