Documentation

TraceableHttpClient
in package
implements HttpClientInterface, ResetInterface, LoggerAwareInterface

FinalYes
Tags
author

Jérémy Romey jeremy@free-agent.fr

Table of Contents

Interfaces

HttpClientInterface
Provides flexible methods for requesting HTTP resources synchronously or asynchronously.
ResetInterface
Provides a way to reset an object to its initial state.
LoggerAwareInterface
Describes a logger-aware instance.

Properties

$client  : mixed
$stopwatch  : mixed
$tracedRequests  : ArrayObject

Methods

__construct()  : mixed
getTracedRequests()  : array<string|int, mixed>
request()  : ResponseInterface
Requests an HTTP resource.
reset()  : mixed
setLogger()  : void
Sets a logger instance on the object.
stream()  : ResponseStreamInterface
Yields responses chunk by chunk as they complete.
withOptions()  : static
Returns a new instance of the client with new default options.

Properties

Methods

getTracedRequests()

public getTracedRequests() : array<string|int, mixed>
Return values
array<string|int, mixed>

request()

Requests an HTTP resource.

public request(string $method, string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
$method : string
$url : string
$options : array<string|int, mixed> = []
Return values
ResponseInterface

withOptions()

Returns a new instance of the client with new default options.

public withOptions(array<string|int, mixed> $options) : static
Parameters
$options : array<string|int, mixed>
Return values
static

        
On this page

Search results