WordPress\AiClient\Providers\Http\DTO

Response::isSuccessful │ public │ WP 0.1.0

Checks if the response indicates success.

Метод класса: Response{}

Хуков нет.

Возвращает

bool. True if status code is 2xx, false otherwise.

Использование

$Response = new Response();
$Response->isSuccessful(): bool;

Список изменений

С версии 0.1.0 Введена.

Код Response::isSuccessful() WP 7.1.4

public function isSuccessful(): bool
{
    return $this->statusCode >= 200 && $this->statusCode < 300;
}