Automator_Send_Webhook::request_type( $data )
Outgoing webhook request type
Contents
Parameters Parameters
- $data
-
(Required)
Return Return
(mixed|void)
Source Source
File: src/core/lib/webhooks/class-automator-send-webhook.php
public function request_type( $data ) { switch ( $data['ACTION_EVENT'] ) { case 'GET': $request_type = apply_filters( 'automator_outgoing_webhook_request_type', 'GET', $data ); break; case 'PUT': $request_type = apply_filters( 'automator_outgoing_webhook_request_type', 'PUT', $data ); break; case 'DELETE': $request_type = apply_filters( 'automator_outgoing_webhook_request_type', 'DELETE', $data ); break; case 'HEAD': $request_type = apply_filters( 'automator_outgoing_webhook_request_type', 'HEAD', $data ); break; case 'automator_custom_value': if ( isset( $data['ACTION_EVENT_custom'] ) ) { $request_type = apply_filters( 'automator_outgoing_webhook_request_type', $data['ACTION_EVENT_custom'], $data ); break; } $request_type = apply_filters( 'automator_outgoing_webhook_request_type', 'POST', $data ); break; case 'POST': case 'CUSTOM': default: $request_type = apply_filters( 'automator_outgoing_webhook_request_type', 'POST', $data ); break; } return $request_type; }
Expand full source code Collapse full source code View on Github