Low level ACME client.

author Niklas Keller
package Kelunik\Acme

 Methods

AcmeClient constructor.

__construct(string $dictionaryUri, \Kelunik\Acme\KeyPair $keyPair, \Amp\Artax\Client|null $http = null
API
api

Parameters

$dictionaryUri

string

URI to the ACME server directory

$keyPair

\Kelunik\Acme\KeyPair

account key pair

$http

\Amp\Artax\Clientnull

custom HTTP client, default client will be used if no value is provided

Retrieves a resource using a GET request.

get(string $resource) : \Amp\Promise
API
api

Parameters

$resource

string

resource to fetch

Exceptions

\Kelunik\Acme\AcmeException If the request failed.

Returns

\Amp\Promiseresolves to the HTTP response

Retrieves a resource using a POST request.

post(string $resource, array $payload) : \Amp\Promise
API
api

Parameters

$resource

string

resource to fetch

$payload

array

Exceptions

\Kelunik\Acme\AcmeException If the request failed.

Returns

\Amp\Promiseresolves to the HTTP response