bookmark_bordergform_webhooks_request_args

Description

The “gform_webhooks_request_args” filter allows the webhook HTTP request arguments to be modified.

Usage

add_filter( 'gform_webhooks_request_args' 'your_function_name', 10, 4 );

Parameters

  • $request_args _autolink_array
    HTTP request arguments
  • $feed _autolink_feed-object
    The Feed Object
  • $entry _autolink_entry-object
    The current entry.
  • $form _autolink_form-object
    The form object.

Example

add_filter( 'gform_webhooks_request_args', 'set_args', 10, 4 );
function set_args( $request_args, $feed, $entry, $form ){
	$request_args['method'] = 'POST';
	$request_args['headers']['From'] = 'test@rocketgenius.com';
	return $request_args;
}

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

This filter is located in GF_Webhooks::process_feed() in gravityformswebhooks/class-gf-webhooks.php