http

package
v0.13.3-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register()

Register registers http protocol.

Types

type Expect

type Expect struct {
	Code   string        `yaml:"code,omitempty"`
	Header yaml.MapSlice `yaml:"header,omitempty"`
	Body   interface{}   `yaml:"body,omitempty"`
}

Expect represents expected response values.

func (*Expect) Build

func (e *Expect) Build(ctx *context.Context) (assert.Assertion, error)

Build implements protocol.AssertionBuilder interface.

type HTTP

type HTTP struct{}

HTTP is a protocol type for the scenarigo step.

func (*HTTP) Name

func (p *HTTP) Name() string

Name implements protocol.Protocol interface.

func (*HTTP) UnmarshalExpect

func (p *HTTP) UnmarshalExpect(b []byte) (protocol.AssertionBuilder, error)

UnmarshalExpect implements protocol.Protocol interface.

func (*HTTP) UnmarshalRequest

func (p *HTTP) UnmarshalRequest(b []byte) (protocol.Invoker, error)

UnmarshalRequest implements protocol.Protocol interface.

type Request

type Request struct {
	Client string      `yaml:"client,omitempty"`
	Method string      `yaml:"method,omitempty"`
	URL    string      `yaml:"url,omitempty"`
	Query  interface{} `yaml:"query,omitempty"`
	Header interface{} `yaml:"header,omitempty"`
	Body   interface{} `yaml:"body,omitempty"`
}

Request represents a request.

func (*Request) Invoke

func (r *Request) Invoke(ctx *context.Context) (*context.Context, interface{}, error)

Invoke implements protocol.Invoker interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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