diff --git a/Content.Server/Content.Server.csproj b/Content.Server/Content.Server.csproj
index ab6085d2fe..b996bf4d65 100644
--- a/Content.Server/Content.Server.csproj
+++ b/Content.Server/Content.Server.csproj
@@ -13,6 +13,7 @@
+
diff --git a/Content.Server/MoMMILink.cs b/Content.Server/MoMMILink.cs
index 868378007e..2b7bcfc8bb 100644
--- a/Content.Server/MoMMILink.cs
+++ b/Content.Server/MoMMILink.cs
@@ -6,6 +6,7 @@ using System.Text;
using System.Threading.Tasks;
using Content.Server.Interfaces;
using Content.Server.Interfaces.Chat;
+using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using Robust.Server.Interfaces.ServerStatus;
using Robust.Server.ServerStatus;
@@ -79,9 +80,9 @@ namespace Content.Server
}
}
- private bool _handleChatPost(HttpMethod method, HttpListenerRequest request, HttpListenerResponse response)
+ private bool _handleChatPost(HttpMethod method, HttpRequest request, HttpResponse response)
{
- if (method != HttpMethod.Post || request.Url.AbsolutePath != "/ooc")
+ if (method != HttpMethod.Post || request.Path != "/ooc")
{
return false;
}
@@ -89,7 +90,7 @@ namespace Content.Server
var password = _configurationManager.GetCVar("status.mommipassword");
OOCPostMessage message;
- using (var streamReader = new StreamReader(request.InputStream, EncodingHelpers.UTF8))
+ using (var streamReader = new StreamReader(request.Body, EncodingHelpers.UTF8))
using (var jsonReader = new JsonTextReader(streamReader))
{
var serializer = new JsonSerializer();
@@ -99,26 +100,26 @@ namespace Content.Server
}
catch (JsonSerializationException)
{
- response.Respond(method, "400 Bad Request", HttpStatusCode.BadRequest, "text/plain");
+ response.StatusCode = (int) HttpStatusCode.BadRequest;
return true;
}
}
if (message == null)
{
- response.Respond(method, "400 Bad Request", HttpStatusCode.BadRequest, "text/plain");
+ response.StatusCode = (int) HttpStatusCode.BadRequest;
return true;
}
if (message.Password != password)
{
- response.Respond(method, "Incorrect password", HttpStatusCode.Forbidden, "text/plain");
+ response.StatusCode = (int) HttpStatusCode.Forbidden;
return true;
}
_taskManager.RunOnMainThread(() => _chatManager.SendHookOOC(message.Sender, message.Contents));
- response.Respond(method, "Message received", HttpStatusCode.OK, "text/plain");
+ response.StatusCode = (int) HttpStatusCode.OK;
return false;
}