webexpect

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExpectTab []*ExpectResponse

Functions

func CheckExpect

func CheckExpect() (success bool)

func InArrayInt

func InArrayInt(lookFor int, inArr []int) bool

func SetExpectResponse

func SetExpectResponse(ee *ExpectResponse)

Types

type ExpectMatchFunc

type ExpectMatchFunc func(string) bool

type ExpectResponse

type ExpectResponse struct {
	UseURL        string          // http://www.2c-why.com/status for example
	Method        string          // GET | POST
	ExpectStatus  []int           // empty if status is not expected, [ 200, 201, ... 304 etc ]
	ExpectREMatch string          // Regular Expression to expect o n success
	ExpectJSON    bool            // Response should be JSON data
	ExpectAny     bool            // True if any non-error response is OK
	ExpectMatch   ExpectMatchFunc // A user supplied matching function
	Timeout       int             // TODO xyzzy - timeout on response - if too slow to respond
	ExitOnFail    bool            // IF set then failure to contct will result in exit.
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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