Nancy.WebApi NuGet Package

The purpose of the project is to enable attribute routing and minimizing the code changes with switching between Nancy and ASP.NET WebAPI.

Here is some sample usage:
[RoutePrefix("api/responseMessage")]
public class ResponseMessageModule : ApiController
{
[HttpGet(nameof(WithStatusCode))]
public ResponseMessage<Address> WithStatusCode()
{
var result = new Address {City = "dummie city"};
return new ResponseMessage<Address>(() => new JsonResponse(result, new JsonNetSerializer()).WithStatusCode(HttpStatusCode.NotModified));
}
}

[RoutePrefix("api/userApi")]
public class UserApi : ApiController
{
[HttpGet("/")]
public IEnumerable<User> GetAll()
{
return new List<User> { new User(), new User() };
}


[HttpGet("/{id}")]
public User GetById(int id)
{
return new User();
}
}.




Got any Nancy.WebApi Question?





Info

Version: 1.0.2
Author(s): Ming Lu
Last Update: Wednesday, February 10, 2016
.NET Fiddle: Create the first Fiddle
Project Url: https://github.com/MingLu8/Nancy.WebApi
NuGet Url: https://www.nuget.org/packages/Nancy.WebApi


Install
Install-Package Nancy.WebApi
dotnet add package Nancy.WebApi
paket add Nancy.WebApi
Nancy.WebApi Download (Unzip the "nupkg" after downloading)

1 package depend on this package.




STATS

must-have-score

.8

avg-downloads-per-day

0

days-since-last-release

3201