mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-18 21:08:16 +08:00
Feature/websockets (#273)
* #212 - hacked websockets proxy together * faffing around * #212 hacking away :( * #212 websockets proxy middleware working * #212 map when for webockets working * #212 some test refactor * #212 temp commit * #212 websockets proxy working, tests passing...need to do some tidying and write docs * #212 more code coverage * #212 docs for websockets * #212 updated readme * #212 tidying up after websockets refactoring * #212 tidying up after websockets refactoring * #212 tidying up after websockets refactoring * stuck a warning in about logging levels into docs!
This commit is contained in:
@ -18,6 +18,7 @@ namespace Ocelot.UnitTests.RateLimit
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Ocelot.Request.Middleware;
|
||||
|
||||
public class ClientRateLimitMiddlewareTests
|
||||
{
|
||||
@ -100,7 +101,7 @@ namespace Ocelot.UnitTests.RateLimit
|
||||
{
|
||||
var request = new HttpRequestMessage(new HttpMethod("GET"), _url);
|
||||
request.Headers.Add("ClientId", clientId);
|
||||
_downstreamContext.DownstreamRequest = request;
|
||||
_downstreamContext.DownstreamRequest = new DownstreamRequest(request);
|
||||
|
||||
_middleware.Invoke(_downstreamContext).GetAwaiter().GetResult();
|
||||
_responseStatusCode = (int)_downstreamContext.HttpContext.Response.StatusCode;
|
||||
@ -115,7 +116,7 @@ namespace Ocelot.UnitTests.RateLimit
|
||||
{
|
||||
var request = new HttpRequestMessage(new HttpMethod("GET"), _url);
|
||||
request.Headers.Add("ClientId", clientId);
|
||||
_downstreamContext.DownstreamRequest = request;
|
||||
_downstreamContext.DownstreamRequest = new DownstreamRequest(request);
|
||||
_downstreamContext.HttpContext.Request.Headers.TryAdd("ClientId", clientId);
|
||||
|
||||
_middleware.Invoke(_downstreamContext).GetAwaiter().GetResult();
|
||||
|
Reference in New Issue
Block a user