httpclient

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpClient

type HttpClient interface {
	Post(urll string, body interface{}, result interface{}, errorResponse interface{}) (StatusCode, error)
	Get(urll string, result interface{}, errorResponse interface{}) (StatusCode, error)
	SetHeader(headers map[string][]string) *httpClient
	SetQueryParams(params map[string]string) *httpClient
	SetBasicAuth(username, password string) *httpClient
	// PostStream sends a POST request and returns raw response for streaming
	PostStream(url string, data any) (*http.Response, error)
	// GetStream sends a GET request and returns raw response for streaming
	GetStream(url string) (*http.Response, error)
}

func NewHttp

func NewHttp() HttpClient

type StatusCode

type StatusCode int

http status code

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL