Skip to content

Commit

Permalink
Merge pull request #14 from Dwolla/invalid-host
Browse files Browse the repository at this point in the history
fix: Trim trailing slash from host url on initialization
  • Loading branch information
jasonmead authored Jul 10, 2017
2 parents 913489f + c35c662 commit 61a2e9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Now that we've set up our client, we can use it to make requests to the API. Let

```php
DwollaSwagger\Configuration::$access_token = 'a token';
$apiClient = new DwollaSwagger\ApiClient("https://api-uat.dwolla.com/");
$apiClient = new DwollaSwagger\ApiClient("https://api-sandbox.dwolla.com/");

$customersApi = new DwollaSwagger\CustomersApi($apiClient);
$myCusties = $customersApi->_list(10);
Expand Down
4 changes: 2 additions & 2 deletions lib/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class ApiClient {
*/
function __construct($host = null) {
if ($host === null) {
$this->host = 'https://localhost/';
$this->host = 'https://localhost';
} else {
$this->host = $host;
$this->host = rtrim($host, "/");
}
}

Expand Down

0 comments on commit 61a2e9b

Please sign in to comment.