コード例 #1
0
        // POST: api/Data
        public HttpResponseMessage Post([FromBody] DataPointModel value)
        {
            int id;

            id = access.AddDataPoint(value);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created);

            response.Headers.Location = new Uri(Request.RequestUri, String.Format("data/{0}", id));
            return(response);
        }