flowcrafter_node_http_request_node_request

  1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Compose an HTTP request before it is sent
  5. Since

Description

Compose the whole request, instead of patching the pieces. An integration that owns the destination — GC API Alchemist resolving a saved connection profile, say — can build the URL, method, headers, and body together and hand the finished request back. Flowcrafter still sends it, so the internal-host gate, the timeout ceiling, WordPress’s own HTTP filters, and the WP_Error retry path all still apply. Return null to leave the request alone. Return an array to adopt it — only the keys present are taken, the rest stay as the node built them. Return a WP_Error to fail the node; add retryable => false to the error data when the cause is permanent, so it fails now instead of after three backoffs.

Usage

Compose an HTTP request before it is sent.

add_filter( 'flowcrafter_node_http_request_node_request', 'my_custom_function' );

Parameters

$composed array|WP_Error|null

Composed request, or null to pass.

$context array

url, request_args, settings, and a resolve callable for extension-owned token strings. Core URL/body are already resolved.

$node array

Node definition.

$run Workflow_Run

Workflow run.

$form array

GF form array.

Examples

Compose an HTTP request before it is sent

add_filter( 'flowcrafter_node_http_request_node_request', fn() => [ 'url' => 'https://example.com/api' ] );

Since

  • 1.0-beta-1 Hook added.