Open dblock opened 6 months ago
To make a raw HTTP request one has to write this.
$response = $client->request('GET', '/shakespeare/_search', [ 'body' => [ 'query' => [ 'match' => [ 'text_entry' => 'long live king' ] ] ] ]);
I'd like a higher level DSL so I could write this:
$response = $client->http()->get('/shakespeare/_search', [ 'body' => [ 'query' => [ 'match' => [ 'text_entry' => 'long live king' ] ] ] ]);
This would be consistent with other clients (see https://code.dblock.org/2023/10/16/making-raw-json-rest-requests-to-opensearch.html) and make it a bit easier on the user.
Let's make sure to have a full working sample along the lines of https://github.com/dblock/opensearch-php-client-demo/blob/main/json.php and a user guide.
Is your feature request related to a problem?
To make a raw HTTP request one has to write this.
What solution would you like?
I'd like a higher level DSL so I could write this:
This would be consistent with other clients (see https://code.dblock.org/2023/10/16/making-raw-json-rest-requests-to-opensearch.html) and make it a bit easier on the user.
Let's make sure to have a full working sample along the lines of https://github.com/dblock/opensearch-php-client-demo/blob/main/json.php and a user guide.