http

package
v3.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHandler

func RegisterHandler()

func RegisterTransport

func RegisterTransport()

Types

type Handler

type Handler struct {
	Service                   *core.Service
	OnError                   interface{}
	P3P                       bool
	GET                       bool
	CrossDomain               bool
	DisableHTTPHeader         bool
	Header                    http.Header
	AccessControlAllowOrigins map[string]bool
	LastModified              string
	Etag                      string
	// contains filtered or unexported fields
}

func (*Handler) AddAccessControlAllowOrigin

func (h *Handler) AddAccessControlAllowOrigin(origins ...string)

AddAccessControlAllowOrigin add access control allow origin.

func (*Handler) BindContext

func (h *Handler) BindContext(ctx context.Context, server core.Server)

BindContext to the http server.

func (*Handler) ClientAccessPolicyXMLContent

func (h *Handler) ClientAccessPolicyXMLContent() []byte

ClientAccessPolicyXMLContent return the client access policy xml content.

func (*Handler) ClientAccessPolicyXMLFile

func (h *Handler) ClientAccessPolicyXMLFile() string

ClientAccessPolicyXMLFile return the client access policy xml file.

func (*Handler) CrossDomainXMLContent

func (h *Handler) CrossDomainXMLContent() []byte

CrossDomainXMLContent return the cross domain xml content.

func (*Handler) CrossDomainXMLFile

func (h *Handler) CrossDomainXMLFile() string

CrossDomainXMLFile return the cross domain xml file.

func (*Handler) RemoveAccessControlAllowOrigin

func (h *Handler) RemoveAccessControlAllowOrigin(origins ...string)

RemoveAccessControlAllowOrigin remove access control allow origin.

func (*Handler) ServeFastHTTP added in v3.0.6

func (h *Handler) ServeFastHTTP(ctx *fasthttp.RequestCtx)

ServeFastHTTP implements the fasthttp.RequestHandler.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(response http.ResponseWriter, request *http.Request)

ServeHTTP implements the http.Handler interface.

func (*Handler) SetClientAccessPolicyXMLContent

func (h *Handler) SetClientAccessPolicyXMLContent(content []byte)

SetClientAccessPolicyXMLContent set the client access policy xml content.

func (*Handler) SetClientAccessPolicyXMLFile

func (h *Handler) SetClientAccessPolicyXMLFile(filename string)

SetClientAccessPolicyXMLFile set the client access policy xml file.

func (*Handler) SetCrossDomainXMLContent

func (h *Handler) SetCrossDomainXMLContent(content []byte)

SetCrossDomainXMLContent set the cross domain xml content.

func (*Handler) SetCrossDomainXMLFile

func (h *Handler) SetCrossDomainXMLFile(filename string)

SetCrossDomainXMLFile set the cross domain xml file.

type Transport

type Transport struct {
	DisableHTTPHeader bool
	Header            http.Header
	HTTPClient        http.Client
}

func (*Transport) Abort

func (trans *Transport) Abort()

func (*Transport) Compression added in v3.0.6

func (trans *Transport) Compression() bool

Compression returns the compression status

func (*Transport) CookieManagerOption added in v3.0.6

func (trans *Transport) CookieManagerOption() cookie.CookieManagerOption

CookieManagerOption returns the CookieManagerOption

func (*Transport) KeepAlive added in v3.0.6

func (trans *Transport) KeepAlive() bool

KeepAlive returns the keepalive status

func (*Transport) SetCompression added in v3.0.6

func (trans *Transport) SetCompression(enable bool)

SetCompression sets the compression status

func (*Transport) SetCookieManagerOption added in v3.0.6

func (trans *Transport) SetCookieManagerOption(option cookie.CookieManagerOption)

SetCookieManagerOption sets the CookieManagerOption

func (*Transport) SetKeepAlive added in v3.0.6

func (trans *Transport) SetKeepAlive(enable bool)

SetKeepAlive sets the keepalive status

func (*Transport) SetTLSClientConfig added in v3.0.6

func (trans *Transport) SetTLSClientConfig(config *tls.Config)

SetTLSClientConfig sets the tls.Config

func (*Transport) TLSClientConfig added in v3.0.6

func (trans *Transport) TLSClientConfig() *tls.Config

TLSClientConfig returns the tls.Config

func (*Transport) Transport

func (trans *Transport) Transport(ctx context.Context, request []byte) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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