Skip to content

Commit 6cb22b1

Browse files
committed
change cursor API from PUT to POST
1 parent ac1cfbd commit 6cb22b1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ error message string "precondition failed". This was changed in version 3.7 to r
1313
same error codes, but an error message string of "conflict". Version 3.8 changes this again
1414
so the error message string is now "conflict, _rev values do not match".
1515

16+
The `Cursor` class will now fetch outstanding cursor result data via HTTP POST requests to
17+
`/_api/cursor/<cursor-id>`. It previously fetched further results via HTTP PUT requests from
18+
the same address. The change is necessary because fetching further results is not an
19+
idempotent operation, but the HTTP standard requires PUT operations to be idempotent.
1620

1721
## Release notes for the ArangoDB-PHP driver 3.7.x
1822

lib/ArangoDBClient/Cursor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ private function sanitize(array $rows)
690690
private function fetchOutstanding()
691691
{
692692
// continuation
693-
$response = $this->_connection->put($this->url() . '/' . $this->_id, '', []);
693+
$response = $this->_connection->post($this->url() . '/' . $this->_id, '', []);
694694
++$this->_fetches;
695695

696696
$data = $response->getJson();

0 commit comments

Comments
 (0)