Building RESTful Web Services with .NET Core : Developing Distributed Web Services to improve scalability with .NET Core 2.0 and ASP.NET Core 2.0.
REST is an architectural style that tackles the challenges of building scalable web services. In today's connected world, APIs have taken a central role on the web. APIs provide the fabric through which systems interact, and REST has become synonymous with APIs. The depth, breadth, and ease of...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Otros Autores: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing,
2018.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Title Page; Copyright and Credits; Dedication; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Getting Started; Discussing RESTful services; REST characteristics; Resource-oriented architecture; URI; REST constraints; Client-server architecture; Stateless; Caching; Code on demand (optional); Uniform interface; More explanation; POST versus PUT explained; Layered system; Advantages and disadvantages of RESTful services; Advantages; Disadvantages; ASP.NET Core and RESTful services; Summary.
- Chapter 2: Building the Initial Framework
- Laying the Foundation of the ApplicationSOAP; SOAP structure; Important points about SOAP; SOAP with HTTP POST; REST; Server and client are independent; Statelessness; Setting up the environment; Running the application; What's cooking here?; Interesting facts; Conclusions; Request and response; HTTP verbs; Postman; GET; Status codes; ASP.NET Core HTTP attributes; POST; PUT; DELETE; SOAP versus REST; Single-page application model; Service-oriented architecture; Summary; Chapter 3: User Registration and Administration.
- Why authentication and limiting requests?Database design; User registration; Setting up EF with the API; Configuring DbContext; Generating the controller; Calling the API from a page to register the customer; CORS; Adding basic authentication to our REST API; Step 1
- Adding the (authorize) attribute; Step 2
- Designing BasicAuthenticationOptions and BasicAuthenticationHandler; Step 3
- Registering basic authentication at startup; Adding OAuth 2.0 authentication to our service; Step 1
- Designing the Config class; Step 2
- Registering Config at startup.
- Step 3
- Adding the [Authorize] attributeStep 4
- Getting the token; Step 5
- Calling the API with the access token; Step 6
- Adding the ProfileService class; Client-based API-consumption architecture; Summary; Chapter 4: Item Catalogue, Cart, and Checkout; Implementing controllers; Generating models; Generating controllers; Product listing; Product searching; Adding to cart; Implementing security; Client-side AddToCart function; API calls for AddToCart; POST
- api/Carts; PUT
- api/Carts/{id}; DELETE
- api/Carts/{id}; Placing orders; UI design for placing an order.
- The client-side PostOrder functionBuilding order objects to match the model class Orders.cs; Pushing cart items into an order object as an array; Calling POST /api/Orders; PostOrders API POST method; Exposing shipping details; Summary; Chapter 5: Integrating External Components and Handling; Understanding the middleware ; Requesting delegates; Use; Run; Map; Adding logging to our API in middleware; Intercepting HTTP requests and responses by building our own middleware; JSON-RPC for RPC communication; Request object; Response object; Summary; Chapter 6: Testing RESTful Web Services.