helioshttp

package module
v1.19.9 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultMaxHeaderBytes = realHttp.DefaultMaxHeaderBytes
View Source
const DefaultMaxIdleConnsPerHost = realHttp.DefaultMaxIdleConnsPerHost
View Source
const MethodConnect = realHttp.MethodConnect
View Source
const MethodDelete = realHttp.MethodDelete
View Source
const MethodGet = realHttp.MethodGet
View Source
const MethodHead = realHttp.MethodHead
View Source
const MethodOptions = realHttp.MethodOptions
View Source
const MethodPatch = realHttp.MethodPatch
View Source
const MethodPost = realHttp.MethodPost
View Source
const MethodPut = realHttp.MethodPut
View Source
const MethodTrace = realHttp.MethodTrace
View Source
const SameSiteDefaultMode = realHttp.SameSiteDefaultMode
View Source
const SameSiteLaxMode = realHttp.SameSiteLaxMode
View Source
const SameSiteNoneMode = realHttp.SameSiteNoneMode
View Source
const SameSiteStrictMode = realHttp.SameSiteStrictMode
View Source
const StateActive = realHttp.StateActive
View Source
const StateClosed = realHttp.StateClosed
View Source
const StateHijacked = realHttp.StateHijacked
View Source
const StateIdle = realHttp.StateIdle
View Source
const StateNew = realHttp.StateNew
View Source
const StatusAccepted = realHttp.StatusAccepted
View Source
const StatusAlreadyReported = realHttp.StatusAlreadyReported
View Source
const StatusBadGateway = realHttp.StatusBadGateway
View Source
const StatusBadRequest = realHttp.StatusBadRequest
View Source
const StatusConflict = realHttp.StatusConflict
View Source
const StatusContinue = realHttp.StatusContinue
View Source
const StatusCreated = realHttp.StatusCreated
View Source
const StatusEarlyHints = realHttp.StatusEarlyHints
View Source
const StatusExpectationFailed = realHttp.StatusExpectationFailed
View Source
const StatusFailedDependency = realHttp.StatusFailedDependency
View Source
const StatusForbidden = realHttp.StatusForbidden
View Source
const StatusFound = realHttp.StatusFound
View Source
const StatusGatewayTimeout = realHttp.StatusGatewayTimeout
View Source
const StatusGone = realHttp.StatusGone
View Source
const StatusHTTPVersionNotSupported = realHttp.StatusHTTPVersionNotSupported
View Source
const StatusIMUsed = realHttp.StatusIMUsed
View Source
const StatusInsufficientStorage = realHttp.StatusInsufficientStorage
View Source
const StatusInternalServerError = realHttp.StatusInternalServerError
View Source
const StatusLengthRequired = realHttp.StatusLengthRequired
View Source
const StatusLocked = realHttp.StatusLocked
View Source
const StatusLoopDetected = realHttp.StatusLoopDetected
View Source
const StatusMethodNotAllowed = realHttp.StatusMethodNotAllowed
View Source
const StatusMisdirectedRequest = realHttp.StatusMisdirectedRequest
View Source
const StatusMovedPermanently = realHttp.StatusMovedPermanently
View Source
const StatusMultiStatus = realHttp.StatusMultiStatus
View Source
const StatusMultipleChoices = realHttp.StatusMultipleChoices
View Source
const StatusNetworkAuthenticationRequired = realHttp.StatusNetworkAuthenticationRequired
View Source
const StatusNoContent = realHttp.StatusNoContent
View Source
const StatusNonAuthoritativeInfo = realHttp.StatusNonAuthoritativeInfo
View Source
const StatusNotAcceptable = realHttp.StatusNotAcceptable
View Source
const StatusNotExtended = realHttp.StatusNotExtended
View Source
const StatusNotFound = realHttp.StatusNotFound
View Source
const StatusNotImplemented = realHttp.StatusNotImplemented
View Source
const StatusNotModified = realHttp.StatusNotModified
View Source
const StatusOK = realHttp.StatusOK
View Source
const StatusPartialContent = realHttp.StatusPartialContent
View Source
const StatusPaymentRequired = realHttp.StatusPaymentRequired
View Source
const StatusPermanentRedirect = realHttp.StatusPermanentRedirect
View Source
const StatusPreconditionFailed = realHttp.StatusPreconditionFailed
View Source
const StatusPreconditionRequired = realHttp.StatusPreconditionRequired
View Source
const StatusProcessing = realHttp.StatusProcessing
View Source
const StatusProxyAuthRequired = realHttp.StatusProxyAuthRequired
View Source
const StatusRequestEntityTooLarge = realHttp.StatusRequestEntityTooLarge
View Source
const StatusRequestHeaderFieldsTooLarge = realHttp.StatusRequestHeaderFieldsTooLarge
View Source
const StatusRequestTimeout = realHttp.StatusRequestTimeout
View Source
const StatusRequestURITooLong = realHttp.StatusRequestURITooLong
View Source
const StatusRequestedRangeNotSatisfiable = realHttp.StatusRequestedRangeNotSatisfiable
View Source
const StatusResetContent = realHttp.StatusResetContent
View Source
const StatusSeeOther = realHttp.StatusSeeOther
View Source
const StatusServiceUnavailable = realHttp.StatusServiceUnavailable
View Source
const StatusSwitchingProtocols = realHttp.StatusSwitchingProtocols
View Source
const StatusTeapot = realHttp.StatusTeapot
View Source
const StatusTemporaryRedirect = realHttp.StatusTemporaryRedirect
View Source
const StatusTooEarly = realHttp.StatusTooEarly
View Source
const StatusTooManyRequests = realHttp.StatusTooManyRequests
View Source
const StatusUnauthorized = realHttp.StatusUnauthorized
View Source
const StatusUnavailableForLegalReasons = realHttp.StatusUnavailableForLegalReasons
View Source
const StatusUnprocessableEntity = realHttp.StatusUnprocessableEntity
View Source
const StatusUnsupportedMediaType = realHttp.StatusUnsupportedMediaType
View Source
const StatusUpgradeRequired = realHttp.StatusUpgradeRequired
View Source
const StatusUseProxy = realHttp.StatusUseProxy
View Source
const StatusVariantAlsoNegotiates = realHttp.StatusVariantAlsoNegotiates
View Source
const TimeFormat = realHttp.TimeFormat
View Source
const TrailerPrefix = realHttp.TrailerPrefix

Variables

View Source
var DefaultClient = &Client{}
View Source
var DefaultServeMux = realHttp.DefaultServeMux
View Source
var DefaultTransport = realHttp.DefaultTransport
View Source
var ErrAbortHandler = realHttp.ErrAbortHandler
View Source
var ErrBodyNotAllowed = realHttp.ErrBodyNotAllowed
View Source
var ErrBodyReadAfterClose = realHttp.ErrBodyReadAfterClose
View Source
var ErrContentLength = realHttp.ErrContentLength
View Source
var ErrHandlerTimeout = realHttp.ErrHandlerTimeout
View Source
var ErrHeaderTooLong = realHttp.ErrHeaderTooLong
View Source
var ErrHijacked = realHttp.ErrHijacked
View Source
var ErrLineTooLong = realHttp.ErrLineTooLong
View Source
var ErrMissingBoundary = realHttp.ErrMissingBoundary
View Source
var ErrMissingContentLength = realHttp.ErrMissingContentLength
View Source
var ErrMissingFile = realHttp.ErrMissingFile
View Source
var ErrNoCookie = realHttp.ErrNoCookie
View Source
var ErrNoLocation = realHttp.ErrNoLocation
View Source
var ErrNotMultipart = realHttp.ErrNotMultipart
View Source
var ErrNotSupported = realHttp.ErrNotSupported
View Source
var ErrServerClosed = realHttp.ErrServerClosed
View Source
var ErrShortBody = realHttp.ErrShortBody
View Source
var ErrSkipAltProtocol = realHttp.ErrSkipAltProtocol
View Source
var ErrUnexpectedTrailer = realHttp.ErrUnexpectedTrailer
View Source
var ErrUseLastResponse = realHttp.ErrUseLastResponse
View Source
var ErrWriteAfterFlush = realHttp.ErrWriteAfterFlush
View Source
var LocalAddrContextKey = realHttp.LocalAddrContextKey
View Source
var NoBody = realHttp.NoBody
View Source
var ServerContextKey = realHttp.ServerContextKey

Functions

func CanonicalHeaderKey

func CanonicalHeaderKey(s string) string

func DetectContentType

func DetectContentType(data []byte) string

func Error

func Error(w ResponseWriter, error string, code int)

func Handle

func Handle(pattern string, handler Handler)

func HandleFunc

func HandleFunc(pattern string, handler func(ResponseWriter, *Request))

func ListenAndServe

func ListenAndServe(addr string, handler Handler) error

func ListenAndServeTLS

func ListenAndServeTLS(addr, certFile, keyFile string, handler Handler) error

func MaxBytesReader

func MaxBytesReader(w ResponseWriter, r io.ReadCloser, n int64) io.ReadCloser

func NotFound

func NotFound(w ResponseWriter, r *Request)

func ParseHTTPVersion

func ParseHTTPVersion(vers string) (major, minor int, ok bool)

func ParseTime

func ParseTime(text string) (t time.Time, err error)

func ProxyFromEnvironment

func ProxyFromEnvironment(req *Request) (*url.URL, error)

func ProxyURL

func ProxyURL(fixedURL *url.URL) func(*Request) (*url.URL, error)

func Redirect

func Redirect(w ResponseWriter, r *Request, url string, code int)

func Serve

func Serve(l net.Listener, handler Handler) error

func ServeContent

func ServeContent(w ResponseWriter, req *Request, name string, modtime time.Time, content io.ReadSeeker)

func ServeFile

func ServeFile(w ResponseWriter, r *Request, name string)

func ServeTLS

func ServeTLS(l net.Listener, handler Handler, certFile, keyFile string) error

func SetCookie

func SetCookie(w ResponseWriter, cookie *Cookie)

func StatusText

func StatusText(code int) string

Types

type Client

type Client struct {
	Transport     RoundTripper
	CheckRedirect func(req *Request, via []*Request) error
	Jar           CookieJar
	Timeout       time.Duration
	// contains filtered or unexported fields
}

func (*Client) CloseIdleConnections

func (c *Client) CloseIdleConnections()

func (*Client) Do

func (c *Client) Do(req *Request) (resp *Response, err error)

func (*Client) Get

func (c *Client) Get(url string) (resp *Response, err error)

func (*Client) GetOriginHttpClient added in v1.18.9

func (c *Client) GetOriginHttpClient() realHttp.Client

func (*Client) Head

func (c *Client) Head(url string) (resp *Response, err error)

func (*Client) Post

func (c *Client) Post(url, contentType string, body io.Reader) (resp *Response, err error)

func (*Client) PostForm

func (c *Client) PostForm(url string, data url.Values) (resp *Response, err error)

type CloseNotifier

type CloseNotifier = realHttp.CloseNotifier

type ConnState

type ConnState = realHttp.ConnState
type Cookie = realHttp.Cookie

type CookieJar

type CookieJar = realHttp.CookieJar

type Dir

type Dir = realHttp.Dir

type File

type File = realHttp.File

type FileSystem

type FileSystem = realHttp.FileSystem

func FS

func FS(fsys fs.FS) FileSystem

type Flusher

type Flusher = realHttp.Flusher

type Handler

type Handler = realHttp.Handler

func AllowQuerySemicolons

func AllowQuerySemicolons(h Handler) Handler

func FileServer

func FileServer(root FileSystem) Handler

func MaxBytesHandler

func MaxBytesHandler(h Handler, n int64) Handler

func NotFoundHandler

func NotFoundHandler() Handler

func RedirectHandler

func RedirectHandler(url string, code int) Handler

func StripPrefix

func StripPrefix(prefix string, h Handler) Handler

func TimeoutHandler

func TimeoutHandler(h Handler, dt time.Duration, msg string) Handler

type HandlerFunc

type HandlerFunc = realHttp.HandlerFunc
type Header = realHttp.Header

type Hijacker

type Hijacker = realHttp.Hijacker

type MaxBytesError added in v1.19.0

type MaxBytesError = realHttp.MaxBytesError

type ProtocolError

type ProtocolError = realHttp.ProtocolError

type PushOptions

type PushOptions = realHttp.PushOptions

type Pusher

type Pusher = realHttp.Pusher

type Request

type Request = realHttp.Request

func NewRequest

func NewRequest(method, url string, body io.Reader) (*Request, error)

func NewRequestWithContext

func NewRequestWithContext(ctx context.Context, method, url string, body io.Reader) (*Request, error)

func ReadRequest

func ReadRequest(b *bufio.Reader) (*Request, error)

type Response

type Response = realHttp.Response

func Get

func Get(url string) (resp *Response, err error)
func Head(url string) (resp *Response, err error)

func Post

func Post(url, contentType string, body io.Reader) (resp *Response, err error)

func PostForm

func PostForm(url string, data url.Values) (resp *Response, err error)

func ReadResponse

func ReadResponse(r *bufio.Reader, req *Request) (*Response, error)

type ResponseWriter

type ResponseWriter = realHttp.ResponseWriter

type RoundTripper

type RoundTripper = realHttp.RoundTripper

func NewFileTransport

func NewFileTransport(fs FileSystem) RoundTripper

type SameSite

type SameSite = realHttp.SameSite

type ServeMux

type ServeMux = realHttp.ServeMux

func NewServeMux

func NewServeMux() *ServeMux

type Server

type Server = realHttp.Server

type Transport

type Transport = realHttp.Transport

Jump to

Keyboard shortcuts

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