Advertisement
Guest User

Untitled

a guest
Aug 31st, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. 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).
  2.  
  3. $rest_response = $client->post($endpoint, [
  4. 'auth' => ['admin', 'some_admin_password'], // IT ONLY WORKS WHEN THIS IS HERE.
  5. 'body' => $some_serialized_body,
  6. 'headers' => [
  7. 'Content-Type' => 'application/hal+json',
  8. 'X-CSRF-Token' => $token,
  9. ],
  10. ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement