public async Task <HttpResponseMessage> Get()
        {
            var body = await Request.Content.ReadAsStringAsync();

            var context    = new ContextImplement(sessionStatus: false, sessionData: false, apiRequestBody: body);
            var controller = new Implem.Pleasanter.Controllers.Api.DeptsController();
            var result     = controller.Get(context: context);

            return(result.ToHttpResponse(Request));
        }
示例#2
0
        public ContentResult Get()
        {
            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.DeptsController();
            var result     = controller.Get(context: context);

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