43 lines
868 B
C#
43 lines
868 B
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Net;
|
|||
|
|
using System.Net.Http;
|
|||
|
|
using System.Web.Http;
|
|||
|
|
|
|||
|
|
namespace AUTS.Web.API
|
|||
|
|
{
|
|||
|
|
public class CacheController1 : ApiController
|
|||
|
|
{
|
|||
|
|
// GET api/<controller>
|
|||
|
|
public IEnumerable<string> Get()
|
|||
|
|
{
|
|||
|
|
return new string[] { "value1", "value2" };
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// GET api/<controller>/5
|
|||
|
|
public string Get(int id)
|
|||
|
|
{
|
|||
|
|
return "value";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// POST api/<controller>
|
|||
|
|
public void Post([FromBody]string value)
|
|||
|
|
{
|
|||
|
|
if (value!=""&&value.Length>0)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// PUT api/<controller>/5
|
|||
|
|
public void Put(int id, [FromBody]string value)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// DELETE api/<controller>/5
|
|||
|
|
public void Delete(int id)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|