marlon-tucker / ProxyApi

A project to auto-generate JavaScript proxies for MVC and WebApi controllers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ProxyApi is a library that automatically creates JavaScript proxy objects for your ASP.NET MVC and WebApi Controllers.

public class DemoController : ApiController
{
    public void Post(int id, Person person) {
	}

	public Person Get(int id) {
	}
}

...becomes...

$.proxies.demo.post({ Name: 'Bob Smith' });

$.proxies.demo.get(5)
  .done(function(person) {
    //use retrieved person
  });

All in 2 easy steps:

  1. Download the NuGet package
  2. Add a script tag for ~/api/proxies

Intellisense Support

If you want intellisense support for the generated proxies, you can download the additional Intellisense NuGet package

See the introductory blog post for more details, and check out greatrexpectations.com for updates.

About

A project to auto-generate JavaScript proxies for MVC and WebApi controllers


Languages

Language:C# 99.3%Language:Shell 0.4%Language:PowerShell 0.3%