httpwrapper

package
v1.0.661 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttp2Server

func NewHttp2Server(bindAddr string, preMasterSecretLogPath string, handler http.Handler) (*http.Server, error)

NewHttp2Server returns a server instance with HTTP/2.0 and HTTP/2.0 cleartext support If this function cannot open or create the secret log file, **it still returns server instance** but without the secret log and error indication

Types

type Request

type Request struct {
	Params map[string]string
	Header http.Header
	Query  url.Values
	Body   interface{}
	URL    *url.URL
}

func NewRequest

func NewRequest(req *http.Request, body interface{}) *Request

type Response

type Response struct {
	Header http.Header
	Status int
	Body   interface{}
}

func NewResponse

func NewResponse(code int, h http.Header, body interface{}) *Response

Jump to

Keyboard shortcuts

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