SSL Encryption

edit

Normally, you will specify SSL configurations when you create the client (see Security for more details), since encryption typically applies to all requests. However, it is possible to configure on a per-request basis too if you need that functionality. For example, if you need to use a self-signed cert on a specific request, you can specify it via the verify parameter in the client options:

$client = ClientBuilder::create()->build();

$params = [
    'index' => 'test',
    'type' => 'test',
    'id' => 1,
    'client' => [
        'verify' => 'path/to/cacert.pem'      //Use a self-signed certificate
    ]
];
$result = $client->get($params);