PHP Interface Analogic\ACME\ClientInterface

Afficher le fichier Open project: analogic/lescript

Méthodes publiques

Méthode Description
__construct ( string $base ) Constructor
get ( string $url ) : array | string
getLastCode ( ) : integer Return the HTTP status code of the last request
getLastLinks ( ) : string[] Get all Link headers of the last request
getLastLocation ( ) : string | null Return the Location header of the last request
getLastNonce ( ) : mixed Returns the Replay-Nonce header of the last request
post ( string $url, array $data ) : array | string Send a POST request

Method Details

__construct() public méthode

Constructor
public __construct ( string $base )
$base string the ACME API base all relative requests are sent to

get() public méthode

public get ( string $url ) : array | string
$url string URL to request via get
Résultat array | string the parsed JSON response, raw response on error

getLastCode() public méthode

Return the HTTP status code of the last request
public getLastCode ( ) : integer
Résultat integer

getLastLocation() public méthode

returns null if last request had no location header
public getLastLocation ( ) : string | null
Résultat string | null

getLastNonce() public méthode

if no request has been made, yet. A GET on $base/directory is done and the resulting nonce returned
public getLastNonce ( ) : mixed
Résultat mixed

post() public méthode

Send a POST request
public post ( string $url, array $data ) : array | string
$url string URL to post to
$data array fields to sent via post
Résultat array | string the parsed JSON response, raw response on error