CyberDuck\Searchly\Index\SearchIndexClient
Client to interact with the Elastic Search API.
- Author: Andrew Mc Cormack <andy@cyber-duck.co.uk>
- Copyright: Copyright (c) 2018, Andrew Mc Cormack
- License: https://github.com/cyber-duck/silverstripe-searchly/license
Synopsis
class SearchIndexClient
{
- // members
- protected Client $client;
- protected $method;
- protected $endpoint;
- protected $body;
- protected array $headers = ;
- protected $response;
- // methods
- public void __construct()
- public SearchIndexClient sendRequest()
- public mixed getResponse()
Members
protected
- $body
—
string
HTTP request body. - $client
—
GuzzleHttp\Client
HTTP client instance. - $endpoint
—
string
HTTP request endpoint. - $headers
—
array
HTTP request headers. - $method
—
string
HTTP request method. - $response
—
mixed
HTTP response.
Methods
public
- __construct() — Sets the required properties and client instance.
- getResponse() — Returns the API response.
- sendRequest() — Sends the API request.