client_ops

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostHeader

func HostHeader(host string, port uint16, isProxy bool) string

HostHeader compute valid host header. host must be idna formatted

func HostPort

func HostPort(host string, port uint16) string

HostPort concat host and port. host must be idna formatted

func IdnaHost

func IdnaHost(host string) string

func WriteRequestHead

func WriteRequestHead(writer io.Writer, method specs.HttpMethod, path string, query specs.Query, header *specs.Header) (int64, error)

Types

type HttpClientResponse

type HttpClientResponse struct {
	Reader io.ReadCloser
	// contains filtered or unexported fields
}

func NewHttpClientResponse

func NewHttpClientResponse(status specs.StatusCode, header *specs.Header) *HttpClientResponse

func ReadResponse

func ReadResponse(ctx context.Context, reader *bufio.Reader, lineLimit int64, totalLimit int64) (*HttpClientResponse, error)

func (*HttpClientResponse) Body

func (resp *HttpClientResponse) Body() io.ReadCloser

func (*HttpClientResponse) Header

func (resp *HttpClientResponse) Header() *specs.Header

func (*HttpClientResponse) StatusCode

func (resp *HttpClientResponse) StatusCode() specs.StatusCode

Jump to

Keyboard shortcuts

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