public async Task <HttpResponseMessage> Create() { var body = await Request.Content.ReadAsStringAsync(); var context = new ContextImplement(sessionStatus: false, sessionData: false, apiRequestBody: body); var controller = new Implem.Pleasanter.Controllers.Api.UsersController(); var result = controller.Create(context: context); return(result.ToHttpResponse(Request)); }
public ContentResult Create() { 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.UsersController(); var result = controller.Create(context: context); return(result.ToHttpResponse(Request)); }