-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from MindscapeHQ/requester-options
Support for Authentication and Proxy setting in HttpClient Closes #11
- Loading branch information
Showing
9 changed files
with
147 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<appSettings> | ||
<add key="druid.broker.host" value="http://localhost"/> | ||
<add key="druid.broker.host" value="http://localhost:8082"/> | ||
</appSettings> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Raygun.Druid4Net/Configuration/BasicAuthenticationCredentials.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace Raygun.Druid4Net | ||
{ | ||
public class BasicAuthenticationCredentials | ||
{ | ||
public string Password { get; set; } | ||
|
||
public string Username { get; set; } | ||
|
||
public override string ToString() => $"{Username}:{Password}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
|
||
namespace Raygun.Druid4Net | ||
{ | ||
public class ConfigurationOptions | ||
{ | ||
public ConfigurationOptions() | ||
{ | ||
QueryApiBaseAddress = new Uri("http://localhost:8082"); | ||
QueryApiEndpoint = "druid/v2"; | ||
} | ||
|
||
public Uri QueryApiBaseAddress { get; set; } | ||
|
||
public string QueryApiEndpoint { get; set; } | ||
|
||
public IJsonSerializer JsonSerializer { get; set; } | ||
|
||
public ProxySettings ProxySettings { get; set; } | ||
|
||
public BasicAuthenticationCredentials BasicAuthenticationCredentials { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
|
||
namespace Raygun.Druid4Net | ||
{ | ||
public class ProxySettings | ||
{ | ||
public Uri Address { get; set; } | ||
|
||
public bool BypassOnLocal { get; set; } | ||
|
||
public string Username { get; set; } | ||
|
||
public string Password { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace Raygun.Druid4Net | ||
{ | ||
public interface IRequester | ||
{ | ||
Task<IQueryResponse<TResponse>> PostAsync<TResponse, TRequest>(string endpoint, IDruidRequest<TRequest> request) | ||
where TResponse : class | ||
where TRequest : QueryRequestData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters