hacking around to get a POST acceptance test working, doesnt really mean anything tbh

This commit is contained in:
TomPallister
2016-09-13 19:34:53 +01:00
parent 72cec38c0e
commit 8423199754
3 changed files with 39 additions and 6 deletions

View File

@ -9,12 +9,12 @@ namespace Ocelot.Library.Infrastructure.Responder
{
public async Task<HttpContext> CreateSuccessResponse(HttpContext context, HttpResponseMessage response)
{
if (!response.IsSuccessStatusCode)
if (response.IsSuccessStatusCode)
{
context.Response.StatusCode = (int)response.StatusCode;
await context.Response.WriteAsync(await response.Content.ReadAsStringAsync());
return context;
}
await context.Response.WriteAsync(await response.Content.ReadAsStringAsync());
return context;
}