replay

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: BSD-3-Clause Imports: 10 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 {
	ID           string // The ID as displayed in the table
	Host         string // the destination host
	Port         string // the destination port
	TLS          bool   // does the destination expect TLS
	RawRequest   []byte // the raw body
	RawResponse  []byte // the raw body
	ResponseTime string // the time it took to recieve the response

	ExternalFile *os.File          `json:"-"` // external file that is currently used to update the request
	Watcher      *fsnotify.Watcher `json:"-"` // watcher for external file updates
}

Request - main struct that holds replay request/response data

func (*Request) Copy added in v0.1.3

func (r *Request) Copy() Request

Copy - return a deep copy of a replay entry

func (*Request) SendRequest

func (r *Request) SendRequest() (int, error)

SendRequest - takes a destination host, port and ssl boolean. Fires the request and writes the response into an array

func (*Request) UpdateContentLength

func (r *Request) UpdateContentLength()

UpdateContentLength - try and update the content length in a raw request to match the body length

Jump to

Keyboard shortcuts

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