Quantcast
Channel: Web Api – no dogma blog
Browsing all 26 articles
Browse latest View live

Using the Polly Timeout when making a Http Request

Full source code available here. When making remote service requests the remote side will sometimes take longer than acceptable to respond. You have a few choices in handling this. 1. Put up with it,...

View Article


Using an mdf file database with Entity Framework Core 2 in Visual Studio 2017

Full source code available here. If you want to play around with Entity Framework it can be a little frustrating to create a complex database with a lot of sample data. Instead, you could download the...

View Article


Using Other Verbs with Web API

Full source code available here. You will often use the GET verb when making requests to an API. You have probably used it like this – www.example.com/person/ or www.example.com/person/1 or...

View Article

Image may be NSFW.
Clik here to view.

Alter response header in Web API to return machine name

Full source code available here. I recently hit a problem where I was getting incorrect responses from a server behind a load balancer. Looking at the logs didn’t help because there was no error. It...

View Article

Selectively Caching a HttpResponseMessage with Polly – caching series 1/3

Full source code here. When I give talks on Polly I show how to use it in a Web API application that calls another Web Api application. I give a simple example of how to use the cache policy where I...

View Article


Passing Configuration Options Into Middleware, Services and Controllers in...

Full source code here. I recently hit a problem where I needed to reload configuration settings as they changed, fortunately this is relatively straightforward when using the IOptionsMonitor, in .NET...

View Article
Browsing all 26 articles
Browse latest View live