class Client

Properties

protected MiddlewarePipeInterface $pipe
protected User|null $actor
protected ServerRequestInterface|null $parent
protected array $queryParams
protected array $body

Methods

__construct(MiddlewarePipeInterface $pipe)

No description

withActor(User $actor)

<p>Set the request actor.</p>

withParentRequest(ServerRequestInterface $parent)

No description

withQueryParams(array $queryParams)

No description

withBody(array $body)

No description

ResponseInterface
get(string $path)

No description

ResponseInterface
post(string $path)

No description

ResponseInterface
put(string $path)

No description

ResponseInterface
patch(string $path)

No description

ResponseInterface
delete(string $path)

No description

ResponseInterface
send(string $method, string $path)

<p>Execute the given API action class, pass the input and return its response.</p>

Details

__construct(MiddlewarePipeInterface $pipe)

Parameters

MiddlewarePipeInterface $pipe

Client withActor(User $actor)

<p>Set the request actor.</p>

<p>This is not needed if a parent request is provided. It can, however, override the parent request's actor.</p>

Parameters

User $actor

Return Value

Client

Client withParentRequest(ServerRequestInterface $parent)

Parameters

ServerRequestInterface $parent

Return Value

Client

Client withQueryParams(array $queryParams)

Parameters

array $queryParams

Return Value

Client

Client withBody(array $body)

Parameters

array $body

Return Value

Client

ResponseInterface get(string $path)

Parameters

string $path

Return Value

ResponseInterface

ResponseInterface post(string $path)

Parameters

string $path

Return Value

ResponseInterface

ResponseInterface put(string $path)

Parameters

string $path

Return Value

ResponseInterface

ResponseInterface patch(string $path)

Parameters

string $path

Return Value

ResponseInterface

ResponseInterface delete(string $path)

Parameters

string $path

Return Value

ResponseInterface

ResponseInterface send(string $method, string $path)

<p>Execute the given API action class, pass the input and return its response.</p>

Parameters

string $method
string $path

Return Value

ResponseInterface