concept handler in category .net

appears as: handler, hdler, The hdlers, hdlers, hdlers, The hdler, hdler
Microservices in .NET Core: with examples in Nancy

This is an excerpt from Manning's book Microservices in .NET Core: with examples in Nancy.

  • Nancy makes it simple to implement HTTP APIs. The route-definition API that Nancy provides makes it easy to add endpoints to a microservice. Just add a route definition and a handler—like Get("/hello", _ ? "world")—to the constructor of a Nancy module, and Nancy will automatically discover it and route requests to the handler.
  • Nancy automatically handles serializing response data and deserializing request data. In the application code, you can return any serializable object from a handler, or you can use model binding to have request data deserialized.
  • The handlers for the commands are only one side of the collaboration. The other side is the code that sends the commands. Figure 4.2 shows that the API Gateway microservice sends commands to the Loyalty Program microservice. You won’t build a complete API Gateway microservice here, but in the code download for this chapter, you’ll find a console application that acts as API Gateway would with regard to collaborating with Loyalty Program. Here, we’ll focus only on the code that sends the commands.