コード例 #1
0
        public IHttpActionResult DeleteZone(int id)
        {
            string token = "";

            if (Request.Headers.Contains("oauth_token"))
            {
                token = Request.Headers.GetValues("oauth_token").First();
            }
            try
            {
                ZoneService.DeleteById(token, id);
            }
            catch (Exception e)
            {
                return(Content(HttpStatusCode.ExpectationFailed, e.Message));
            }
            return(StatusCode(HttpStatusCode.NoContent));
        }