Nancy

Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono http://nancyfx.org

Meet Nancy 

Nancy is a lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono. The goal of the framework is to stay out of the way as much as possible and provide a super-duper-happy-path to all interactions.

Nancy is designed to handle DELETEGETHEADOPTIONSPOSTPUT and PATCH requests and provides a simple, elegant, Domain Specific Language (DSL) for returning a response with just a couple of keystrokes, leaving you with more time to focus on the important bits.. your code and your application.

Write your application

public class Module : NancyModule
{
    public Module()
    {
        Get["/greet/{name}"] = x => {
            return string.Concat("Hello ", x.name);
        };
    }
}

Compile, run and enjoy the simple, elegant design!

Ref:.NET的微型Web框架 Nancy

原文地址:https://www.cnblogs.com/ncore/p/5148751.html