Skip to content

Commit

Permalink
Merge pull request #32 from john-hartley/allow-custom-headers
Browse files Browse the repository at this point in the history
Allow custom headers.
  • Loading branch information
john-hartley authored Sep 22, 2018
2 parents 6c51c2f + f1f5a8c commit 3d025d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.9.{build}
version: 1.0.{build}
image: Visual Studio 2017
configuration: Release
skip_tags: true
Expand Down
6 changes: 3 additions & 3 deletions src/GoCardless.Api/Core/Configuration/ClientConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ private ClientConfiguration(bool live, string accessToken)
throw new ArgumentException("Value is null, empty or whitespace.", nameof(accessToken));
}

AccessToken = accessToken;

BaseUri = live
? "https://api.gocardless.com/"
: "https://api-sandbox.gocardless.com/";

AccessToken = accessToken;

Headers = new Dictionary<string, string>
{
["Authorization"] = $"Bearer {AccessToken}",
Expand All @@ -37,6 +37,6 @@ private ClientConfiguration(bool live, string accessToken)

public string BaseUri { get; }
public string AccessToken { get; }
public IReadOnlyDictionary<string, string> Headers { get; }
public IDictionary<string, string> Headers { get; }
}
}

0 comments on commit 3d025d4

Please sign in to comment.