Configuration
An example with additional configuration options (using default values):
use Servebolt\Sdk\Client;$client = new Client([ 'apiToken' => 'your-api-token', // Available authentication drivers: apiToken 'authDriver' => 'apiToken', // API base URL 'baseUri' => 'https://api.servebolt.io/v1/', // Whether to throw exceptions whenever a 4xx HTTP error occurs during a request 'throwExceptionsOnClientError' => false, // Decide how you want the SDK to respond after querying the API // Options: customResponse, psr7, decodedBody 'responseObjectType' = 'customResponse',]);
#
Response typescustomResponse
(default) - returns an instance of Servebolt\Sdk\Response. See further documentation here.
psr7
- returns an instance of GuzzleHttp\Psr7\Response.
decodedBody
- returns a stdClass object of the decoded JSON body.