コード例 #1
0
        public async Task <HttpResponseMessage> Set()
        {
            var body = await Request.Content.ReadAsStringAsync();

            var context    = new ContextImplement(apiRequestBody: body);
            var controller = new Implem.Pleasanter.Controllers.Api.SessionsController();
            var result     = controller.Set(context: context);

            return(result.ToHttpResponse(Request));
        }
コード例 #2
0
        public ContentResult Set()
        {
            var body = default(string);

            using (var reader = new StreamReader(Request.Body)) body = reader.ReadToEnd();
            var context    = new ContextImplement(sessionStatus: false, sessionData: false, apiRequestBody: body);
            var controller = new Implem.Pleasanter.Controllers.Api.SessionsController();
            var result     = controller.Set(context: context);

            return(result.ToHttpResponse(request: Request));
        }