Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save contensis/e12052ff3f91fedff5d0 to your computer and use it in GitHub Desktop.
Save contensis/e12052ff3f91fedff5d0 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Specialized;
using System.Net;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Web.Http;
using Contensis.Framework.Web.Controllers;
namespace MyCompanyNamespace
{
/// <summary>
/// Handle the response from a Contensis Form Html Helper, or
/// any other Contensis interaction via Http
/// </summary>
[RoutePrefix("api/custom/myendpoint")]
public class MyExampleApiController : ContensisApiController
{
[HttpPost]
[Route("myAction")]
public HttpResponseMessage MyAction(FormDataCollection data)
{
return CreateResponse("Success message.");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment