http

package
v0.0.0-...-1dc5a0e Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithGET

func WithGET(tr *Transport)

WithGET method of request

func WithPOST

func WithPOST(tr *Transport)

WithPOST method of request

Types

type Option

type Option func(tr *Transport)

Option of transport connection

func WithMaxConn

func WithMaxConn(connCount int) Option

WithMaxConn from the client

func WithRoundTripper

func WithRoundTripper(transport http.RoundTripper) Option

WithRoundTripper custom interface

func WithTimeout

func WithTimeout(timeout, keepAlive time.Duration) Option

WithTimeout sets request timeouts

type Transport

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

Transport for user specific detection

func NewTransport

func NewTransport(url string, options ...Option) *Transport

NewTransport returns transport interface with HTTP protocol support

func (*Transport) Close

func (tr *Transport) Close() error

func (*Transport) Detect

func (tr *Transport) Detect(ctx context.Context, req *protocol.Request) (*protocol.Response, error)

Detect information from request

Jump to

Keyboard shortcuts

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