http

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(id string)

func IsRequest added in v0.2.0

func IsRequest(data []byte) bool

Types

type Http

type Http struct {
	Request  *HttpMessage
	Response *HttpMessage
}

func Parse added in v0.2.0

func Parse(id string, request []byte, response []byte) (*Http, bool)

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

	Headers map[string]string
	// 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