diff --git a/src/Artemis.Core/Services/WebServer/EndPoints/JsonPluginEndPoint.cs b/src/Artemis.Core/Services/WebServer/EndPoints/JsonPluginEndPoint.cs index 061bd984e..ffee5bc63 100644 --- a/src/Artemis.Core/Services/WebServer/EndPoints/JsonPluginEndPoint.cs +++ b/src/Artemis.Core/Services/WebServer/EndPoints/JsonPluginEndPoint.cs @@ -43,9 +43,9 @@ namespace Artemis.Core.Services /// protected override async Task ProcessRequest(IHttpContext context) { - if (context.Request.HttpVerb != HttpVerbs.Post) - throw HttpException.MethodNotAllowed("This end point only accepts POST calls"); - + if (context.Request.HttpVerb != HttpVerbs.Post && context.Request.HttpVerb != HttpVerbs.Put) + throw HttpException.MethodNotAllowed("This end point only accepts POST and PUT calls"); + context.Response.ContentType = MimeType.Json; using TextReader reader = context.OpenRequestText(); diff --git a/src/Artemis.Core/Services/WebServer/EndPoints/StringPluginEndPoint.cs b/src/Artemis.Core/Services/WebServer/EndPoints/StringPluginEndPoint.cs index b5f65bb2d..b8f996d1c 100644 --- a/src/Artemis.Core/Services/WebServer/EndPoints/StringPluginEndPoint.cs +++ b/src/Artemis.Core/Services/WebServer/EndPoints/StringPluginEndPoint.cs @@ -32,8 +32,8 @@ namespace Artemis.Core.Services /// protected override async Task ProcessRequest(IHttpContext context) { - if (context.Request.HttpVerb != HttpVerbs.Post) - throw HttpException.MethodNotAllowed("This end point only accepts POST calls"); + if (context.Request.HttpVerb != HttpVerbs.Post && context.Request.HttpVerb != HttpVerbs.Put) + throw HttpException.MethodNotAllowed("This end point only accepts POST and PUT calls"); context.Response.ContentType = MimeType.PlainText;