FlowiseAI/Flowise · error · Error

URL is required for POST request

Error message

URL is required for POST request

What it means

Thrown by RequestsPost_Core._call when this.url is falsy at invocation time. The POST tool needs a target URL before it can send a body. It aborts before constructing request headers or the JSON body.

Source

Thrown at packages/components/nodes/tools/RequestsPost/core.ts:110

            method: 'POST',
            headers: args?.headers || {}
        }
        super(toolInput)
        this.url = args?.url ?? this.url
        this.headers = args?.headers ?? this.headers
        this.body = args?.body ?? this.body
        this.maxOutputLength = args?.maxOutputLength ?? this.maxOutputLength
        this.bodySchema = args?.bodySchema
    }

    /** @ignore */
    async _call(arg: any): Promise<string> {
        const params = { ...arg }

        try {
            const inputUrl = this.url
            if (!inputUrl) {
                throw new Error('URL is required for POST request')
            }

            let inputBody = {
                ...this.body
            }

            if (this.bodySchema && params.body && Object.keys(params.body).length > 0) {
                inputBody = {
                    ...inputBody,
                    ...params.body
                }
            }

            const requestHeaders = {
                'Content-Type': 'application/json',
                ...(params.headers || {}),
                ...this.headers
            }

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Supply `url` in the constructor: `new RequestsPost_Core({ url: 'https://...' })`.
  2. Confirm the Flowise RequestsPost node has a non-empty URL and that bound variables resolve.
  3. Pre-validate at the orchestration layer and skip the call when no URL is configured.

Example fix

// before
const tool = new RequestsPost_Core({ body: { x: 1 } } as any)
await tool._call({}) // throws: URL is required for POST request

// after
const tool = new RequestsPost_Core({ url: 'https://api.example.com/items', body: { x: 1 } } as any)
await tool._call({})
Defensive patterns

Strategy: validation

Validate before calling

function assertPostToolReady(tool: any, body?: unknown) {
  if (!tool.url || !/^https?:\/\//.test(tool.url)) throw new Error('RequestsPost requires a valid http(s) url')
  if (body !== undefined && typeof body !== 'object') throw new Error('RequestsPost body must be an object')
}
assertPostToolReady(tool)
await tool._call({})

Type guard

const hasValidPostConfig = (t: any): t is { url: string; body?: object } =>
  typeof t?.url === 'string' && /^https?:\/\//.test(t.url) && (t.body === undefined || typeof t.body === 'object')

Try / catch

try {
  assertPostToolReady(tool)
  return await tool._call({})
} catch (e) {
  if (/URL is required/.test((e as Error).message)) throw new Error('RequestsPost not configured: set the URL')
  throw e
}

Prevention

When it happens

Trigger: Constructing the tool without a `url` field and invoking it; a flow variable bound to the URL resolving to empty; programmatic use with an empty options object.

Common situations: RequestsPost node in the canvas has a blank URL; webhook/API URL env var not set; template placeholder for the URL did not resolve at runtime.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/9346b17a4ff12285. Report an issue: GitHub.