CryptoJones icon

AttributeRouting

CryptoJones | PRO | 10/20/16 09:12:57 PM UTC | 0 ⭐ | 509 👁️ | Never ⏰ | []
C# |

610 B

|

None

|

0 👍

/

0 👎

using System.Collections.Generic;
using System.Web.Http;
 
namespace ReinkeAppsApi.Controllers
{
    [RoutePrefix("v1/quote")]
    public class QuoteV1Controller : ApiController
    {
        [RequireHttps]
        [Route("v1/quote/get")]
        public IEnumerable<string> Get()
        {
            return new string[] { "I\'ve just picked up a fault in the AE35 unit. It\'s going to go 100% failure in 72 hours." };
        }
 
        [RequireHttps]
        [Route("v1/quote/post")]
        public void Post([FromBody]string value)
        {
            int i = 1;
            i++;
        }
 
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎