nrequest

package
v0.0.0-...-110f058 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OUTPUT_RESPONSE_NAME = "response"
	OUTPUT_REQUEST_NAME  = "request"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeRequest

type NodeRequest struct {
	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