requests

package
v0.0.0-...-5b6649e Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileReader

func NewFileReader(file string, scheme string, host string) (types.RequestSource, error)

Types

type Request

type Request struct {
	Method      string
	Path        string
	QueryString string
	Headers     map[string][]string
	Body        string
}

type StreamReader

type StreamReader struct {
	// contains filtered or unexported fields
}

StreamReader is an instance of RequestSource that iterates over a list of JSON requests, using a static scheme and host. The JSON records are decoded as Request instances. As the Requests returned by Next() are decoded from a io.Reader, the response body is never read in the Read(*http.Response) method.

func (*StreamReader) Next

func (s *StreamReader) Next() (*http.Request, error)

func (*StreamReader) Read

func (s *StreamReader) Read(resp *http.Response) (int64, error)

func (*StreamReader) Reset

func (s *StreamReader) Reset() error

Jump to

Keyboard shortcuts

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