client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 15 Imported by: 5

Documentation

Index

Constants

View Source
const (
	DefaultRequestMethod = http.MethodGet
)

Variables

This section is empty.

Functions

func NewRequestHeader

func NewRequestHeader(key, value string) requestHeader

Types

type Interface

type Interface interface {
	SetCore(core *fasthttp.Client) Interface
	SetTelemetryManager(telemetry telemetry.Interface) Interface
	Request(url string, opts ...RequestOption) (*response, error)
}

func New

func New(opts ...Option) Interface

type Option

type Option func(*client)

func WithCore

func WithCore(core *fasthttp.Client) Option

func WithCoreOptions

func WithCoreOptions(opts ...core.Option) Option

func WithTelemetryManager

func WithTelemetryManager(telemetry telemetry.Interface) Option

type RequestOption

type RequestOption func(*request)

func WithRequestBody

func WithRequestBody(body []byte) RequestOption

func WithRequestContext

func WithRequestContext(context context.Context) RequestOption

func WithRequestHeaders

func WithRequestHeaders(headers ...requestHeader) RequestOption

func WithRequestJsonBody

func WithRequestJsonBody(data any) RequestOption

func WithRequestMethod

func WithRequestMethod(method string) RequestOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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