http

package
v3.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 14 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                   func(http.ResponseWriter, *http.Request, error)
	P3P                       bool
	GET                       bool
	CrossDomain               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) 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 {
	Header     http.Header
	HTTPClient http.Client
}

func (*Transport) Abort

func (trans *Transport) Abort()

func (*Transport) Transport

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

Jump to

Keyboard shortcuts

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