vault-php
vault-php copied to clipboard
List API has changed to GET Method
In the BaseClient.php the list method uses LIST as the HTTP Method.
In the Hashicorp Vault documentation all the list endpoints use a standard GET HTTP method. So I get an Error when sending the call.
It just needs to change from this:
/**
* @param string $path
*
* @return Response
* @throws InvalidArgumentException
* @throws ClientExceptionInterface
*/
public function list(string $path = ''): Response
{
return $this->responseBuilder->build($this->send('LIST', $path));
}
To this:
/**
* @param string $path
*
* @return Response
* @throws InvalidArgumentException
* @throws ClientExceptionInterface
*/
public function list(string $path = ''): Response
{
return $this->responseBuilder->build($this->send('GET', $path));
}
Should be not a big deal. :)
I saw that below the list method there was a get method so I used it inside the keys method. :)
As I see in the doc they still use LIST method on some calls, are you sure that we need to delete it and replace with get?