Replace DELETE method by POST according to the Cloudflare [documentation](https://api.cloudflare.com/#zone-purge-all-files)

This commit is contained in:
Nathan S
2020-06-21 14:52:11 +02:00
parent 694342f718
commit c575b3bc9b
2 changed files with 8 additions and 8 deletions

View File

@@ -217,7 +217,7 @@ class Zones implements API
*/
public function cachePurgeEverything(string $zoneID): bool
{
$user = $this->adapter->delete('zones/' . $zoneID . '/purge_cache', ['purge_everything' => true]);
$user = $this->adapter->post('zones/' . $zoneID . '/purge_cache', ['purge_everything' => true]);
$this->body = json_decode($user->getBody());
@@ -247,7 +247,7 @@ class Zones implements API
$options['hosts'] = $hosts;
}
$user = $this->adapter->delete('zones/' . $zoneID . '/purge_cache', $options);
$user = $this->adapter->post('zones/' . $zoneID . '/purge_cache', $options);
$this->body = json_decode($user->getBody());