WPDev.one
Core Function
View Source on Trac ↗

rest_send_allow_header()

rest_send_allow_header( mixed $response, mixed $server, mixed $request )

Sends the "Allow" header to state all methods that can be sent to the current route.

Parameters 3 required

Name / Type Description
$response
WP_REST_Response

Current response being served.

Required
$server
WP_REST_Server

ResponseHandler instance (usually WP_REST_Server).

Required
$request
WP_REST_Request

The request that was used to make current response.

Required

Return Value

(WP_REST_Response)
Response to be served, with "Allow" header if route has allowed methods.

Function Information

Since Version
4.4.0
Source File
wp-includes/rest-api.php
Advertisement