WordPress\AiClient\Providers\Http\DTO

RequestOptions::allowsRedirectspublicWP 0.2.0

Checks whether redirects are allowed.

Method of the class: RequestOptions{}

No Hooks.

Returns

true|false|null. True when redirects are allowed (maxRedirects > 0), false when disabled (maxRedirects = 0), null when unspecified (maxRedirects = null).

Usage

$RequestOptions = new RequestOptions();
$RequestOptions->allowsRedirects(): ?bool;

Changelog

Since 0.2.0 Introduced.

RequestOptions::allowsRedirects() code WP 7.0

public function allowsRedirects(): ?bool
{
    if ($this->maxRedirects === null) {
        return null;
    }
    return $this->maxRedirects > 0;
}