Documentation
¶
Index ¶
- Constants
- Variables
- func ResetEnvironment(ctx context.Context)
- func WithEnvironment(ctx context.Context, env map[string]string) context.Context
- func WithRequestRunner(ctx context.Context, runner RequestRunner) context.Context
- func WithRuntime(ctx context.Context, rt *Runtime) context.Context
- type Assertion
- type Header
- type Headers
- type Request
- type RequestRunner
- type Response
- type Runtime
Constants ¶
View Source
const (
RequestSeparator = "###"
)
Variables ¶
View Source
var ErrInvalidRequest = errors.New("invalid request")
Functions ¶
func ResetEnvironment ¶
func WithEnvironment ¶
func WithRequestRunner ¶
func WithRequestRunner(ctx context.Context, runner RequestRunner) context.Context
Types ¶
type Request ¶
type Request struct { // The name of the request // Example: Get User Name string // PreRequestScript is a piece of JavaScript code that executes before the request is sent. // Example: var token = req.environment.get("token"); PreRequestScript string // PostRequestScript is a piece of JavaScript code that executes after the request is sent. PostRequestScript string // The HTTP method used (GET, POST, PUT, DELETE, etc.) Method string // The URL of the request URL string // The HTTP body // Note: The body is not parsed. // Example: {"foo":"bar"} // Example: <xml><foo>bar</foo></xml> // Example: foo=bar&baz=qux Body string // The http Headers Headers Headers }
Request is a struct that holds the HTTP request data.
func ParseFromFile ¶
func ParseRequests ¶
func (Request) DisplayName ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.