httpclientmodule

package
v1.21.9 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpClientModule

type HttpClientModule struct {
	service.Module
	// contains filtered or unexported fields
}

func (*HttpClientModule) Init

func (m *HttpClientModule) Init(proxyUrl string, maxpool int, dialTimeout time.Duration, dialKeepAlive time.Duration, idleConnTimeout time.Duration, timeout time.Duration)

func (*HttpClientModule) InitHttpClient added in v1.21.9

func (m *HttpClientModule) InitHttpClient(transport http.RoundTripper, timeout time.Duration, checkRedirect func(req *http.Request, via []*http.Request) error)

func (*HttpClientModule) Request

func (m *HttpClientModule) Request(method string, url string, body []byte, header http.Header) HttpResponse

func (*HttpClientModule) SetTimeOut

func (m *HttpClientModule) SetTimeOut(value time.Duration)

func (*HttpClientModule) SyncRequest

func (m *HttpClientModule) SyncRequest(method string, url string, body []byte, header http.Header) SyncHttpResponse

type HttpResponse

type HttpResponse struct {
	Err        error
	Header     http.Header
	StatusCode int
	Status     string
	Body       []byte
}

type SyncHttpResponse

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

func (*SyncHttpResponse) Get

func (slf *SyncHttpResponse) Get(timeoutMs int) HttpResponse

Jump to

Keyboard shortcuts

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