class UntrustedUrl

Constants

protected MAX_REDIRECTS

MAX_KILOBYTES

Properties

static protected Closure|null $resolver

Methods

static Response
fetch(string $url)

Fetch the URL, validating it and every redirect hop against private and internal addresses.

static void
resolveUsing(Closure|null $resolver)

Resolve hostnames with the given callback, or the system resolver when null.

static void
flushState()

Flush all static state.

Details

at line 38
static Response fetch(string $url)

Fetch the URL, validating it and every redirect hop against private and internal addresses.

Parameters

string $url

Return Value

Response

Exceptions

InvalidArgumentException

at line 129
static void resolveUsing(Closure|null $resolver)

Resolve hostnames with the given callback, or the system resolver when null.

The callback persists for the worker lifetime and affects every subsequent fetch.

Parameters

Closure|null $resolver

Return Value

void

at line 140
static void flushState()

Flush all static state.

Return Value

void