{"modulePath":"github.com/the-dev-tools/dev-tools/packages/server","version":"v0.0.0-20261108121446-820be1ff163d","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package nrequest\n\n## Constants\n\n```go\nconst (\n\tOUTPUT_RESPONSE_NAME = \"response\"\n\tOUTPUT_REQUEST_NAME  = \"request\"\n)\n```\n\n```go\nconst LeanBodyPlaceholder = \"[body dropped: lean mode]\"\n```\nLeanBodyPlaceholder 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.\n\n## Types\n\n```go\ntype NodeRequest struct {\n\t// KeepBodyInLean keeps this node's response body in lean mode because a\n\t// later node reads it (e.g. {{ Login.response.body.token }}). Set by the\n\t// load runner; ignored outside lean mode.\n\tKeepBodyInLean bool\n\n\t// Stream reads the response as a stream with this preset and timeout (the step's\n\t// stream: option). Nil still streams a text/event-stream response, as raw sse.\n\tStream *httpclient.StreamOptions\n\n\t// NoFollowRedirects returns a 30x response as is instead of following it (the step's\n\t// follow_redirects: false), so a flow can assert the redirect itself.\n\tNoFollowRedirects bool\n\n\tFlownNodeID idwrap.IDWrap\n\tName        string\n\n\tHttpReq mhttp.HTTP\n\tHeaders []mhttp.HTTPHeader\n\tParams  []mhttp.HTTPSearchParam\n\n\tRawBody  *mhttp.HTTPBodyRaw\n\tFormBody []mhttp.HTTPBodyForm\n\tUrlBody  []mhttp.HTTPBodyUrlencoded\n\tAsserts  []mhttp.HTTPAssert\n\n\tHttpClient              httpclient.HttpClient\n\tNodeRequestSideRespChan chan NodeRequestSideResp\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New(id idwrap.IDWrap, name string,\n\thttpReq mhttp.HTTP,\n\theaders []mhttp.HTTPHeader,\n\tparams []mhttp.HTTPSearchParam,\n\trawBody *mhttp.HTTPBodyRaw,\n\tformBody []mhttp.HTTPBodyForm,\n\turlBody []mhttp.HTTPBodyUrlencoded,\n\tasserts []mhttp.HTTPAssert,\n\thttpClient httpclient.HttpClient, nodeRequestSideRespChan chan NodeRequestSideResp, logger *slog.Logger,\n) *NodeRequest\n```\n\n```go\nfunc (nr *NodeRequest) GetID() idwrap.IDWrap\n```\n\n```go\nfunc (nr *NodeRequest) GetName() string\n```\n\n```go\nfunc (nr *NodeRequest) GetOutputVariables() []string\n```\nGetOutputVariables implements node.VariableIntrospector. Returns the output paths this HTTP node produces.\n\n```go\nfunc (nr *NodeRequest) GetRequiredVariables() []string\n```\nGetRequiredVariables implements node.VariableIntrospector. It extracts all variable references from URL, headers, query params, and body.\n\n```go\nfunc (nr *NodeRequest) RunAsync(ctx context.Context, req *node.FlowNodeRequest, resultChan chan node.FlowNodeResult)\n```\n\n```go\nfunc (nr *NodeRequest) RunSync(ctx context.Context, req *node.FlowNodeRequest) node.FlowNodeResult\n```\n\n```go\nfunc (nr *NodeRequest) SetID(id idwrap.IDWrap)\n```\n\n```go\ntype NodeRequestOutput struct {\n\tRequest  request.RequestResponseVar `json:\"request\"`\n\tResponse httpclient.ResponseVar     `json:\"response\"`\n}\n```\n\n```go\ntype NodeRequestSideResp struct {\n\t// Execution tracking\n\tExecutionID idwrap.IDWrap // The specific execution ID for this request\n\n\t// Request\n\tHttpReq mhttp.HTTP\n\tHeaders []mhttp.HTTPHeader\n\tParams  []mhttp.HTTPSearchParam\n\n\tRawBody  *mhttp.HTTPBodyRaw\n\tFormBody []mhttp.HTTPBodyForm\n\tUrlBody  []mhttp.HTTPBodyUrlencoded\n\n\t// Resp\n\tResp response.ResponseCreateHTTPOutput\n\n\t// Synchronization\n\tDone chan struct{}\n}\n```\n\n","path":"github.com/the-dev-tools/dev-tools/packages/server/pkg/flow/node/nrequest","name":"nrequest","synopsis":"","isRedistributable":true}
