Skip to content

Commit

Permalink
Merge pull request #11 from dmitriyGarden/master
Browse files Browse the repository at this point in the history
Fix PreparedQueryClient
  • Loading branch information
dcarbone authored May 20, 2017
2 parents 400dd0c + cfaf628 commit 0c39cad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PreparedQuery/PreparedQueryClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class PreparedQueryClient extends AbstractClient {
* )
*/
public function create(PreparedQueryDefinition $query, WriteOptions $writeOptions = null) {
$r = new Request('GET', 'v1/query', $this->c, $query);
$r = new Request('POST', 'v1/query', $this->c, $query);
$r->setWriteOptions($writeOptions);

/** @var \Psr\Http\Message\ResponseInterface $response */
Expand Down Expand Up @@ -167,7 +167,7 @@ public function delete($queryID, WriteOptions $writeOptions = null) {
* )
*/
public function execute($queryIDOrName, QueryOptions $queryOptions = null) {
$r = new Request('GET', sprintf('v1/query/%s', $queryIDOrName), $this->c);
$r = new Request('GET', sprintf('v1/query/%s/execute', $queryIDOrName), $this->c);
$r->setQueryOptions($queryOptions);

/** @var \Psr\Http\Message\ResponseInterface $response */
Expand All @@ -185,4 +185,4 @@ public function execute($queryIDOrName, QueryOptions $queryOptions = null) {

return [new PreparedQueryExecuteResponse($body), $qm, null];
}
}
}

0 comments on commit 0c39cad

Please sign in to comment.