Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GuzzleHttpExceptionClientException: Client error: `POST http://local.dev/entity/distribution_ingest/NGM:123456?_format=hal_json` resulted in a `401 Unauthorized` response: No authentication credentials provided. in GuzzleHttpExceptionRequestException::create() (line 107 of /home/vagrant/docroot/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php).
- $rest_response = $client->post($endpoint, [
- 'auth' => ['admin', 'some_admin_password'], // IT ONLY WORKS WHEN THIS IS HERE.
- 'body' => $some_serialized_body,
- 'headers' => [
- 'Content-Type' => 'application/hal+json',
- 'X-CSRF-Token' => $token,
- ],
- ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement