nrequest

package
v0.0.0-...-820be1f Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 10 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	OUTPUT_RESPONSE_NAME = "response"
	OUTPUT_REQUEST_NAME  = "request"
)
View Source
const LeanBodyPlaceholder = "[body dropped: lean mode]"

LeanBodyPlaceholder stands in for the response body in node output when the flow runs in lean mode, so consumers can tell a dropped body from an empty one.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeRequest

type NodeRequest struct {
	// KeepBodyInLean keeps this node's response body in lean mode because a
	// later node reads it (e.g. {{ Login.response.body.token }}). Set by the
	// load runner; ignored outside lean mode.
	KeepBodyInLean bool

	// Stream reads the response as a stream with this preset and timeout (the step's
	// stream: option). Nil still streams a text/event-stream response, as raw sse.
	Stream *httpclient.StreamOptions

	// NoFollowRedirects returns a 30x response as is instead of following it (the step's
	// follow_redirects: false), so a flow can assert the redirect itself.
	NoFollowRedirects bool

	FlownNodeID idwrap.IDWrap
	Name        string

	HttpReq mhttp.HTTP
	Headers []mhttp.HTTPHeader
	Params  []mhttp.HTTPSearchParam

	RawBody  *mhttp.HTTPBodyRaw
	FormBody []mhttp.HTTPBodyForm
	UrlBody  []mhttp.HTTPBodyUrlencoded
	Asserts  []mhttp.HTTPAssert

	HttpClient              httpclient.HttpClient
	NodeRequestSideRespChan chan NodeRequestSideResp
	// contains filtered or unexported fields
}

func New

func New(id idwrap.IDWrap, name string,
	httpReq mhttp.HTTP,
	headers []mhttp.HTTPHeader,
	params []mhttp.HTTPSearchParam,
	rawBody *mhttp.HTTPBodyRaw,
	formBody []mhttp.HTTPBodyForm,
	urlBody []mhttp.HTTPBodyUrlencoded,
	asserts []mhttp.HTTPAssert,
	httpClient httpclient.HttpClient, nodeRequestSideRespChan chan NodeRequestSideResp, logger *slog.Logger,
) *NodeRequest

func (*NodeRequest) GetID

func (nr *NodeRequest) GetID() idwrap.IDWrap

func (*NodeRequest) GetName

func (nr *NodeRequest) GetName() string

func (*NodeRequest) GetOutputVariables

func (nr *NodeRequest) GetOutputVariables() []string

GetOutputVariables implements node.VariableIntrospector. Returns the output paths this HTTP node produces.

func (*NodeRequest) GetRequiredVariables

func (nr *NodeRequest) GetRequiredVariables() []string

GetRequiredVariables implements node.VariableIntrospector. It extracts all variable references from URL, headers, query params, and body.

func (*NodeRequest) RunAsync

func (nr *NodeRequest) RunAsync(ctx context.Context, req *node.FlowNodeRequest, resultChan chan node.FlowNodeResult)

func (*NodeRequest) RunSync

func (*NodeRequest) SetID

func (nr *NodeRequest) SetID(id idwrap.IDWrap)

type NodeRequestOutput

type NodeRequestOutput struct {
	Request  request.RequestResponseVar `json:"request"`
	Response httpclient.ResponseVar     `json:"response"`
}

type NodeRequestSideResp

type NodeRequestSideResp struct {
	// Execution tracking
	ExecutionID idwrap.IDWrap // The specific execution ID for this request

	// Request
	HttpReq mhttp.HTTP
	Headers []mhttp.HTTPHeader
	Params  []mhttp.HTTPSearchParam

	RawBody  *mhttp.HTTPBodyRaw
	FormBody []mhttp.HTTPBodyForm
	UrlBody  []mhttp.HTTPBodyUrlencoded

	// Resp
	Resp response.ResponseCreateHTTPOutput

	// Synchronization
	Done chan struct{}
}

Jump to

Keyboard shortcuts

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