httpclient

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	RequestDelivery(endpoint string, headers *Headers, body *bytes.Buffer) (int, error)
}

type FastHttpClient

type FastHttpClient struct {
	// contains filtered or unexported fields
}

func FastHttp

func FastHttp(client *fasthttp.Client) *FastHttpClient

FastHttp tell service to use fasthttp.Client. If client is nil, default client will be used.

func (*FastHttpClient) RequestDelivery

func (f *FastHttpClient) RequestDelivery(endpoint string, headers *Headers, body *bytes.Buffer) (int, error)

type Headers

type Headers struct {
	Authorization string
	Urgency       string
	TTL           time.Duration
}

type StdHttpClient

type StdHttpClient struct {
	// contains filtered or unexported fields
}

func StdHttp

func StdHttp(client *http.Client) *StdHttpClient

func (*StdHttpClient) RequestDelivery

func (f *StdHttpClient) RequestDelivery(endpoint string, headers *Headers, body *bytes.Buffer) (int, error)

Jump to

Keyboard shortcuts

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