diff --git a/includes/class-http.php b/includes/class-http.php index 1157137..e243997 100644 --- a/includes/class-http.php +++ b/includes/class-http.php @@ -20,6 +20,8 @@ class Http { * @return array|WP_Error The POST Response or an WP_ERROR */ public static function post( $url, $body, $user_id ) { + do_action( 'activitypub_pre_http_post', $url, $body, $user_id ); + $date = \gmdate( 'D, d M Y H:i:s T' ); $digest = Signature::generate_digest( $body ); $signature = Signature::generate_signature( $user_id, 'post', $url, $date, $digest ); @@ -68,6 +70,8 @@ class Http { * @return array|WP_Error The GET Response or an WP_ERROR */ public static function get( $url ) { + do_action( 'activitypub_pre_http_get', $url ); + $date = \gmdate( 'D, d M Y H:i:s T' ); $signature = Signature::generate_signature( Users::APPLICATION_USER_ID, 'get', $url, $date );