Yoast\WP\SEO\AI_HTTP_Request\Infrastructure
API_Client_Interface::perform_request
Устарела с версии 28.4. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.
Performs a request to the API.
Метод класса: API_Client_Interface{}
Хуков нет.
Возвращает
array<int|string|array<string>>. The response from the API.
Использование
$API_Client_Interface = new API_Client_Interface(); $API_Client_Interface->perform_request( $action_path, $body, $headers, $http_method ): array;
- $action_path(строка) (обязательный)
- The action path for the request.
- $body(array
|null) (обязательный) - The body of the request, or null/empty to send no body.
- $headers(array
) (обязательный) - The headers for the request.
- $http_method(строка) (обязательный)
- The HTTP method for the request. One of
Request::METHOD_*.
Список изменений
| Устарела с | 28.4 |
Код API_Client_Interface::perform_request() API Client Interface::perform request Yoast 28.9
public function perform_request( string $action_path, $body, $headers, string $http_method ): array;