Programming

Single or Array JSON Converter

Single or array JSON converter. Often APIs will have actions where one of the parameters can be either a single object or an array of objects, in order to correctly serialize objects to JSON which can be accepted by the API a custom JsonConverter is needed. This code is borrowed Read more…

By Shinigami, ago
Programming

ASP.NET 5 Middleware

The ability to create your own middleware comes in pretty handy when creating MVC 6 APIs as it allows the inspection and processing of the requests/responses flowing into and out of the application. A few of the most useful ones I’ve used are below, a good guide to using middleware Read more…

By Shinigami, ago
Programming

API .Net Core XML Ingestion

What I need to do here is to create an API that can authenticate and ingest an XML POST request, saving the provided data into a SQL database and returning a relevant HTML status code. Unfortunately this wasn’t quite as easy as I’d anticipated as the XML data will be Read more…

By Shinigami, ago