http

package
v0.0.0-...-e537141 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(root *URL, pattern string) (s string)

Types

type Client

type Client interface {
	DoRequest(ctx *Context) error
}

type ClientWithRoot

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

func (ClientWithRoot) DoRequest

func (c ClientWithRoot) DoRequest(ctx *Context) (err error)

type Context

type Context struct {
	Request  *Request
	Response *Response
}

type ContextPool

type ContextPool interface {
	GetContext() *Context
	PutContext(*Context)
}

type LogHandler

type LogHandler struct{}

type Pools

type Pools struct {
	Context ContextPool
	Bytes   pool.OfBytes
}

type PreHandler

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

func WithPreHandler

func WithPreHandler(cl Client, pre ResponseHandler) (p PreHandler)

func (PreHandler) DoRequest

func (p PreHandler) DoRequest(ctx *Context) (err error)

type Request

type Request = http.Request

type RequestConfig

type RequestConfig interface {
	ModifyRequest(r *Request)
}

type Response

type Response = http.Response

type ResponseHandler

type ResponseHandler interface {
	HandleResponse(*Response) error
}

type ResponseHandlerFunc

type ResponseHandlerFunc func(*Response) error

func (ResponseHandlerFunc) HandleResponse

func (r ResponseHandlerFunc) HandleResponse(resp *Response) (err error)

type Service

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

type URL

type URL = url.URL

func JoinParse

func JoinParse(root *URL, pattern string) (url *URL, err error)

func JoinURL

func JoinURL(root, part *URL) (url *URL, err error)

Jump to

Keyboard shortcuts

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