internal IHttpActionResult GetInnerActionResult()
 {
     if (RequestPreferenceHelpers.RequestPrefersReturnContent(new WebApiRequestHeaders(_innerResult.Request.Headers)))
     {
         return(_innerResult);
     }
     else
     {
         return(new StatusCodeResult(HttpStatusCode.NoContent, _innerResult.Request));
     }
 }
Example #2
0
        internal IActionResult GetInnerActionResult(HttpRequest request)
        {
            if (RequestPreferenceHelpers.RequestPrefersReturnContent(new WebApiRequestHeaders(request.Headers)))
            {
                ObjectResult objectResult = new ObjectResult(_innerResult)
                {
                    StatusCode = StatusCodes.Status200OK
                };

                return(objectResult);
            }
            else
            {
                return(new StatusCodeResult((int)HttpStatusCode.NoContent));
            }
        }