Methods |
public
|
uri(UriInterface|Stringable|string|null $value): $this
Endpoint URI (cannot have query or fragment components)
Endpoint URI (cannot have query or fragment components)
|
#
|
public
|
headers(Arrayable<string, string[]|string>|iterable<string, string[]|string>|null $value): $this
Request headers
|
#
|
public
|
accessToken(AccessTokenInterface|null $value): $this
Access token applied to request headers
Access token applied to request headers
|
#
|
public
|
accessTokenHeaderName(string $value): $this
Name of access token header (default: `"Authorization"`)
Name of access token header (default: "Authorization" )
|
#
|
public
|
sensitiveHeaders(string[] $value): $this
Headers treated as sensitive (default: {@see HttpHeaderGroup::SENSITIVE})
Headers treated as sensitive (default: {@see HttpHeaderGroup::SENSITIVE})
|
#
|
public
|
mediaType(string|null $value): $this
Media type applied to request headers
Media type applied to request headers
|
#
|
public
|
userAgent(string|null $value): $this
User agent applied to request headers
User agent applied to request headers
|
#
|
public
|
expectJson(bool $value = true): $this
Explicitly accept JSON-encoded responses and assume responses with no content type contain JSON (default: true)
Explicitly accept JSON-encoded responses and assume responses with no content type contain JSON (default: true)
|
#
|
public
|
postJson(bool $value = true): $this
Use JSON to encode POST/PUT/PATCH/DELETE data (default: true)
Use JSON to encode POST/PUT/PATCH/DELETE data (default: true)
|
#
|
public
|
dateFormatter(DateFormatterInterface|null $value): $this
Date formatter used to format and parse the endpoint's date and time values
Date formatter used to format and parse the endpoint's date and time values
|
#
|
public
|
formDataFlags(int-mask-of<FormDataFlag::*> $value): $this
Flags used to encode data for query strings and message bodies (default: {@see FormDataFlag::PRESERVE_NUMERIC_KEYS} `|`…
Flags used to encode data for query strings and message bodies (default: {@see FormDataFlag::PRESERVE_NUMERIC_KEYS} | {@see FormDataFlag::PRESERVE_STRING_KEYS})
|
#
|
public
|
jsonDecodeFlags(
int-mask-of<JSON_BIGINT_AS_STRING|JSON_INVALID_UTF8_IGNORE|JSON_INVALID_UTF8_SUBSTITUTE|JSON_OBJECT_AS_ARRAY|JSON_THROW_ON_ERROR> $value,
): $this
Flags used to decode JSON returned by the endpoint (default: {@see \JSON_OBJECT_AS_ARRAY})
Flags used to decode JSON returned by the endpoint (default: {@see \JSON_OBJECT_AS_ARRAY})
|
#
|
public
|
middleware(
array<array{(CurlerMiddlewareInterface|HttpRequestHandlerInterface|(Closure(RequestInterface $request, Closure(RequestInterface): HttpResponseInterface $next, CurlerInterface $curler): ResponseInterface)), 1?: (string|null)}> $value,
): $this
Middleware applied to the request handler stack
Middleware applied to the request handler stack
|
#
|
public
|
pager(CurlerPagerInterface|null $value): $this
Pagination handler
|
#
|
public
|
alwaysPaginate(bool $value = true): $this
Use the pager to process requests even if no pagination is required (default: false)
Use the pager to process requests even if no pagination is required (default: false)
|
#
|
public
|
cacheStore(CacheInterface|null $value): $this
Cache store used for cookie and response caching instead of the {@see Cache} facade's underlying store
Cache store used for cookie and response caching instead of the {@see Cache} facade's underlying store
|
#
|
public
|
handleCookies(bool $value = true): $this
Enable cookie handling (default: false)
Enable cookie handling (default: false)
|
#
|
public
|
cookiesCacheKey(string|null $value): $this
Key to cache cookies under (cookie handling is implicitly enabled if given)
Key to cache cookies under (cookie handling is implicitly enabled if given)
|
#
|
public
|
cacheResponses(bool $value = true): $this
Cache responses to GET and HEAD requests (HTTP caching headers are ignored; USE RESPONSIBLY) (default: false)
Cache responses to GET and HEAD requests (HTTP caching headers are ignored; USE RESPONSIBLY) (default: false)
|
#
|
public
|
cachePostResponses(bool $value = true): $this
Cache responses to repeatable POST requests (ignored if GET and HEAD request caching is disabled) (default: false)
Cache responses to repeatable POST requests (ignored if GET and HEAD request caching is disabled) (default: false)
|
#
|
public
|
cacheKeyCallback((callable(RequestInterface $request, CurlerInterface $curler): (string[]|string))|null $value): $this
Override values hashed and combined with request method and URI to create response cache keys (headers not in {@see…
Override values hashed and combined with request method and URI to create response cache keys (headers not in {@see HttpHeaderGroup::UNSTABLE} are used by default)
|
#
|
public
|
cacheLifetime(int<-1, max> $value): $this
Seconds before cached responses expire when caching is enabled (`0` = cache indefinitely; `-1` = do not cache; default:…
Seconds before cached responses expire when caching is enabled (0 = cache indefinitely; -1 = do not cache; default: 3600 )
|
#
|
public
|
refreshCache(bool $value = true): $this
Replace cached responses even if they haven't expired (default: false)
Replace cached responses even if they haven't expired (default: false)
|
#
|
public
|
timeout(int<0, max>|null $value): $this
Connection timeout in seconds (`null` = use underlying default of `300` seconds; default: `null`)
Connection timeout in seconds (null = use underlying default of 300 seconds; default: null )
|
#
|
public
|
followRedirects(bool $value = true): $this
Follow "Location" headers (default: false)
Follow "Location" headers (default: false)
|
#
|
public
|
maxRedirects(int<-1, max>|null $value): $this
Limit the number of "Location" headers followed (`-1` = unlimited; `0` = do not follow redirects; `null` = use…
Limit the number of "Location" headers followed (-1 = unlimited; 0 = do not follow redirects; null = use underlying default of 30 ; default: null )
|
#
|
public
|
retryAfterTooManyRequests(bool $value = true): $this
Retry throttled requests when the endpoint returns a "Retry-After" header (default: false)
Retry throttled requests when the endpoint returns a "Retry-After" header (default: false)
|
#
|
public
|
retryAfterMaxSeconds(int<0, max> $value): $this
Limit the delay between request attempts (`0` = unlimited; default: `300`)
Limit the delay between request attempts (0 = unlimited; default: 300 )
|
#
|
public
|
throwHttpErrors(bool $value = true): $this
Throw exceptions for HTTP errors (default: true)
Throw exceptions for HTTP errors (default: true)
|
#
|
public
|
head(mixed[]|null $query = null): HttpHeadersInterface
Send a HEAD request to the endpoint
Send a HEAD request to the endpoint
|
#
|
public
|
get(mixed[]|null $query = null): mixed
Send a GET request to the endpoint and return the body of the response
Send a GET request to the endpoint and return the body of the response
|
#
|
public
|
post(mixed[]|object|null $data = null, mixed[]|null $query = null): mixed
Send a POST request to the endpoint and return the body of the response
Send a POST request to the endpoint and return the body of the response
|
#
|
public
|
put(mixed[]|object|null $data = null, mixed[]|null $query = null): mixed
Send a PUT request to the endpoint and return the body of the response
Send a PUT request to the endpoint and return the body of the response
|
#
|
public
|
patch(mixed[]|object|null $data = null, mixed[]|null $query = null): mixed
Send a PATCH request to the endpoint and return the body of the response
Send a PATCH request to the endpoint and return the body of the response
|
#
|
public
|
delete(mixed[]|object|null $data = null, mixed[]|null $query = null): mixed
Send a DELETE request to the endpoint and return the body of the response
Send a DELETE request to the endpoint and return the body of the response
|
#
|
public
|
getP(mixed[]|null $query = null): iterable<mixed>
Send a GET request to the endpoint and iterate over response pages
Send a GET request to the endpoint and iterate over response pages
|
#
|
public
|
postP(mixed[]|object|null $data = null, mixed[]|null $query = null): iterable<mixed>
Send a POST request to the endpoint and iterate over response pages
Send a POST request to the endpoint and iterate over response pages
|
#
|
public
|
putP(mixed[]|object|null $data = null, mixed[]|null $query = null): iterable<mixed>
Send a PUT request to the endpoint and iterate over response pages
Send a PUT request to the endpoint and iterate over response pages
|
#
|
public
|
patchP(mixed[]|object|null $data = null, mixed[]|null $query = null): iterable<mixed>
Send a PATCH request to the endpoint and iterate over response pages
Send a PATCH request to the endpoint and iterate over response pages
|
#
|
public
|
deleteP(mixed[]|object|null $data = null, mixed[]|null $query = null): iterable<mixed>
Send a DELETE request to the endpoint and iterate over response pages
Send a DELETE request to the endpoint and iterate over response pages
|
#
|
public
|
postR(string $data, string $mediaType, mixed[]|null $query = null): mixed
Send raw data to the endpoint in a POST request and return the body of the response
Send raw data to the endpoint in a POST request and return the body of the response
|
#
|
public
|
putR(string $data, string $mediaType, mixed[]|null $query = null): mixed
Send raw data to the endpoint in a PUT request and return the body of the response
Send raw data to the endpoint in a PUT request and return the body of the response
|
#
|
public
|
patchR(string $data, string $mediaType, mixed[]|null $query = null): mixed
Send raw data to the endpoint in a PATCH request and return the body of the response
Send raw data to the endpoint in a PATCH request and return the body of the response
|
#
|
public
|
deleteR(string $data, string $mediaType, mixed[]|null $query = null): mixed
Send raw data to the endpoint in a DELETE request and return the body of the response
Send raw data to the endpoint in a DELETE request and return the body of the response
|
#
|