Workflow : webrequest

Topics: Core, Customizing Orchard
Sep 3, 2013 at 9:22 AM
Hi There

I have created a workflow and am trying to post to a custom method within an apicontroller.
I have tried numerous configurations but cant get the Webrequest to call my custom method.

Method in API Controller
 public class DealersAPIController : ApiController 
    {
        private readonly IDealerService _dealerService;

        public DealersAPIController(
            IDealerService dealerService) 
        {
            _dealerService = dealerService;
        }

        [HttpPost]
        public HttpResponseMessage BookATestDrive(string Name)
        {
            //Testing Book a Test Drive
            var name = Name;


            return null;
        }

    }
Route
  new HttpRouteDescriptor {
                        Name = "DealersBookATestDrive",
                        Priority = 101,
                        RouteTemplate = "api/BookATestDrive",
                        Defaults = new {
                            area = "Hellocomputer.Toyota.Dealers",
                            controller = "DealersAPI",
                            action = "BookATestDrive"
                    }
                 }
WebRequest config

URL

/API/BookATestDrive

Method : post

Key Pairs

name = "stanton"

Please could anybody help on how to call a webapi method or how I should go about configuring this.

Thanks
Stanton