Interfaces

Project

Pages Restful

NuGet packageOwin.Framework.Pages.Restful
GitHub sourceOwinFramework.Pages.Restful

Home |  Readme

Restful service element reference | The OWIN FRamework

Service Page Elements

Service elements handle requests matching the path and methods configured then return responses that are calculated in application code. Services are typically used to provide endpoints that Javascrpipt can call using AJAX. When these calls are made, the service endpoint validates and parses its input parameters, performs some processing and returns a response.

Attribute Example

This is an example of defining a service element using a class decorated with attributes.

[IsService("order", "/order/", new[] { Method.Post, Method.Get, Method.Put, Method.Delete })]
public class OrderService
{
    [Endpoint(UrlPath = "{id}", Methods = new[] { Method.Get })]
    public void Get(IEndpointRequest request)
    {
        throw new NotImplementedException();
    }
}

In this use case the [IsService()] attribute has properties that specify how Http requests are routed to the service.

Service Class Example

TBD

Example of a Package Containing a Servcie

TBD