httpx

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderUserAgent    = "User-Agent"
	HeaderContentType  = "Content-Type"
	HeaderRequestID    = "X-Request-ID"
	HeaderForwardedFor = "X-Forwarded-For"
	HeaderRealIP       = "X-Real-IP"
)
View Source
const (
	MIME_JSON                = "application/json"
	MIME_HTML                = "text/html"
	MIME_XML                 = "application/xml"
	MIME_PLAIN               = "text/plain"
	MIME_POST_URLENCODED     = "application/x-www-form-urlencoded"
	MIME_MULTIPART_FORM_DATA = "multipart/form-data"
	MIME_PROTOBUF            = "application/x-protobuf"
	MIME_MSGPACK             = "application/x-msgpack"
)

Variables

This section is empty.

Functions

func GetClientIPByHeaderForwardedFor

func GetClientIPByHeaderForwardedFor(headerForwardedFor string) string

func GetClientIPByHeaderRealIP

func GetClientIPByHeaderRealIP(headerRealIP string) string

func RedirectWithStatusFound

func RedirectWithStatusFound(uri string) *statusFound

func RedirectWithStatusMovedPermanently

func RedirectWithStatusMovedPermanently(uri string) *statusMovedPermanently

func RedirectWithStatusPermanentRedirect

func RedirectWithStatusPermanentRedirect(uri string) *statusPermanentRedirect

func RedirectWithStatusSeeOther

func RedirectWithStatusSeeOther(uri string) *statusSeeOther

func RedirectWithStatusTemporaryRedirect

func RedirectWithStatusTemporaryRedirect(uri string) *statusTemporaryRedirect

Types

type HTML

type HTML struct {
	bytes.Buffer
}

swagger:strfmt html

func NewHTML

func NewHTML(data []byte) *HTML

func (HTML) ContentType

func (h HTML) ContentType() string

type ICookie

type ICookie interface {
	Cookies() *http.Cookie
}

type IRedirect

type IRedirect interface {
	Redirect(host string) string
	Status() int
}

type MethodDelete

type MethodDelete struct{}

func (MethodDelete) Method

func (MethodDelete) Method() string

type MethodGet

type MethodGet struct {
}

func (MethodGet) Method

func (MethodGet) Method() string

type MethodHead

type MethodHead struct{}

func (MethodHead) Method

func (MethodHead) Method() string

type MethodPatch

type MethodPatch struct{}

func (MethodPatch) Method

func (MethodPatch) Method() string

type MethodPost

type MethodPost struct{}

func (MethodPost) Method

func (MethodPost) Method() string

type MethodPut

type MethodPut struct{}

func (MethodPut) Method

func (MethodPut) Method() string

type WithCookie

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

func (*WithCookie) Cookies

func (c *WithCookie) Cookies() *http.Cookie

func (*WithCookie) SetCookie

func (c *WithCookie) SetCookie(cookie *http.Cookie)

Jump to

Keyboard shortcuts

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