-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
102 additions
and
8 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 |
---|---|---|
|
@@ -203,3 +203,5 @@ FakesAssemblies/ | |
|
||
# snk key file | ||
*.snk | ||
|
||
.ionide/ |
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
4 changes: 2 additions & 2 deletions
4
src/Elasticsearch.Net.Aws/ElasticSearch.Net.Aws.IntegrationTests/TargetConfig.json
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,4 +1,4 @@ | ||
{ | ||
"endpoint": "<your aws elasticsearch service endpoint>", | ||
"region": "us-east-1" | ||
"endpoint": "https://search-dice-preview-logging-k4u5ga2hk4tk5muztuduyi7tea.us-east-1.es.amazonaws.com", | ||
"region": "us-east-1" | ||
} |
2 changes: 1 addition & 1 deletion
2
src/Elasticsearch.Net.Aws/ElasticSearch.Net.Aws.Tests/ElasticSearch.Net.Aws.Tests.csproj
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
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
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
46 changes: 46 additions & 0 deletions
46
src/Elasticsearch.Net.Aws/Elasticsearch.Net.Aws/HttpWebRequestAdapter.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,46 @@ | ||
#if NETFRAMEWORK | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Net; | ||
using System.Text; | ||
|
||
namespace Elasticsearch.Net.Aws | ||
{ | ||
class HttpWebRequestAdapter : IRequest, IHeaders | ||
{ | ||
readonly HttpWebRequest _request; | ||
public HttpWebRequestAdapter(HttpWebRequest request) | ||
{ | ||
_request = request; | ||
} | ||
|
||
public IHeaders Headers => this; | ||
|
||
public string Method => _request.Method; | ||
|
||
public Uri RequestUri => _request.Address; | ||
|
||
public string XAmzDate | ||
{ | ||
get => _request.Headers["x-amz-date"]; | ||
set => _request.Headers["x-amz-date"] = value; | ||
} | ||
|
||
public string Authorization | ||
{ | ||
get => _request.Headers[HttpRequestHeader.Authorization]; | ||
set => _request.Headers[HttpRequestHeader.Authorization] = value; | ||
} | ||
|
||
public string XAmzSecurityToken | ||
{ | ||
get => _request.Headers["x-amz-security-token"]; | ||
set => _request.Headers["x-amz-security-token"] = value; | ||
} | ||
|
||
public IEnumerable<string> Keys => _request.Headers.AllKeys; | ||
|
||
public IEnumerable<string> GetValues(string name) => _request.Headers.GetValues(name); | ||
} | ||
} | ||
#endif |