http

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_RECV_SIZE = 10 * 1024

Variables

This section is empty.

Functions

func Close

func Close(id string)

Types

type Http

type Http struct {
	Request  *HttpMessage
	Response *HttpMessage
}

func GetResult

func GetResult(id string) *Http

func ParseReponse

func ParseReponse(id string, request []byte, showBody bool) (*Http, bool)

func ParseRequest

func ParseRequest(id string, request []byte, showBody bool) (*Http, bool)

func (*Http) GetSearchKey

func (t *Http) GetSearchKey() string

type HttpMessage

type HttpMessage struct {
	Ts               time.Time
	Version          version
	HasContentLength bool
	Connection       string

	//Request Info
	RequestURI   string
	Method       string
	StatusCode   int
	StatusPhrase string

	// Http Headers
	ContentLength int
	ContentType   string
	Host          string
	Referer       string
	UserAgent     string
	Location      string

	Headers map[string]string

	RawHeaders []byte

	Body              []byte
	TotalReceivedSize int
	TotslExtraMsgSize int
	// contains filtered or unexported fields
}

Http Message

Jump to

Keyboard shortcuts

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