Documentation
¶
Index ¶
Constants ¶
View Source
const (
StageCaptures = "captures"
)
Variables ¶
View Source
var ErrPollTimeout = errors.New("poll deadline exceeded")
ErrPollTimeout is returned when @poll reaches its timeout. The result may still contain the last response.
Functions ¶
This section is empty.
Types ¶
type CaptureInput ¶
type HTTPHooks ¶
type HTTPHooks struct {
AttachSSEHandle func(*httpx.StreamHandle, *restfile.Request)
AttachWebSocketHandle func(*httpx.WebSocketHandle, *restfile.Request)
ApplyCaptures func(CaptureInput) error
// CollectVariables rebuilds variables after pre-request scripts; the third
// argument contains their writes at script precedence.
CollectVariables func(*restfile.Document, *restfile.Request, vars.NameMap[string]) map[string]string
RunTests func(TestInput) ([]scriptapi.TestResult, error)
EvaluatePredicate func(PredicateInput) (bool, error)
OnRepeatProgress func(RepeatProgress)
Warn func(string)
}
type HTTPResult ¶
type HTTPResult struct {
Response *httpx.Response
Stream *scripts.StreamInfo
Tests []scriptapi.TestResult
ScriptErr error
Err error
Decision string
ErrStage string
Repeat RepeatCount
}
type PredicateInput ¶ added in v1.4.0
type RepeatCount ¶ added in v1.4.0
type RepeatPhase ¶ added in v1.4.0
type RepeatPhase uint8
const ( RepeatAttempt RepeatPhase = iota RepeatRetryWait RepeatPollWait )
type RepeatProgress ¶ added in v1.4.0
type RequestFlow ¶
type RequestFlow interface {
PendingCancel() *RequestResult
Finish()
EvaluateRunVars() *RequestResult
EvaluateCondition() *RequestResult
RunPreRequest() *RequestResult
PrepareRequest() *RequestResult
PreviewResult() RequestResult
UseGRPC() bool
IsInteractiveWebSocket() bool
ExecuteInteractiveWebSocket() RequestResult
ExecuteGRPC() RequestResult
ExecuteHTTP() RequestResult
}
type RequestResult ¶
type RequestResult struct {
Response *httpx.Response
GRPC *grpcx.Response
Stream *scripts.StreamInfo
Transcript []byte
Err error
Tests []scriptapi.TestResult
ScriptErr error
Checked bool
Executed *restfile.Request
RequestText string
RuntimeSecrets []string
Environment string
Selection vars.Selection
Skipped bool
SkipReason string
Preview bool
Explain *explain.Report
Timing engine.Timing
}
func RunRequest ¶
func RunRequest(flow RequestFlow) RequestResult
Click to show internal directories.
Click to hide internal directories.