Skip to content

Commit

Permalink
fix: set the basic auth for all requests
Browse files Browse the repository at this point in the history
  • Loading branch information
gsdevme authored and ChrisDBrown committed Mar 25, 2019
1 parent fc65857 commit 85a5eff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ManagementApi/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ public function send($endpoint, $method = 'GET', $headers = [], $body = null)
$headers['Content-Type'] = 'application/json';
}

$response = $this->client->send(new Request($method, $endpoint, $headers, $body));
$response = $this->client->send(
new Request($method, $endpoint, $headers, $body),
[
'auth' => [$this->username, $this->password],
]
);

return json_decode($response->getBody(), true);
}
Expand Down

0 comments on commit 85a5eff

Please sign in to comment.