http

package
v0.0.0-...-ebee754 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Proto         string
	RequestURI    string
	Method        string
	Host          string
	Header        http.Header
	ContentLength int
	Body          []byte
	Address       string
}

func ReadRequest

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

func (*Request) Release

func (r *Request) Release()

func (*Request) WriteTo

func (r *Request) WriteTo(w io.Writer) (n int64, err error)

type Response

type Response struct {
	Request       *Request
	Status        string
	StatusCode    int
	Proto         string
	Header        http.Header
	Body          []byte
	ContentLength int
	Address       string
	// contains filtered or unexported fields
}

func ReadResponse

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

func (*Response) Dumper

func (r *Response) Dumper(w io.Writer, displayLargeBody bool) (n int64, err error)

func (*Response) Release

func (r *Response) Release()

func (*Response) WriteTo

func (r *Response) WriteTo(w io.Writer) (n int64, err error)

Jump to

Keyboard shortcuts

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