Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.

Follow @CodeOpinion


HTTP API Problem Details in ASP.NET Core

If you’ve been writing HTTP API’s, you likely have needed to return exceptions and errors back to the consuming clients.  Before you go and grow your own solution to this common problem, there is RFC 7807 Problem Details for HTTP APIs which set out solve this problem. “problem detail” as a way to carry machine-readable details of errors in a HTTP response to avoid the need to define new error response formats for HTTP APIs. Problem Details in ASP.NET Core Now that you’re on board with Problem Details, how do we use or implement this in ASP.NET Core.  Thankfully, Kristian Hellang has… Read More »HTTP API Problem Details in ASP.NET Core

RESTful JSON: Adding Links to your APIs

There’s a new media type available, RESTful JSON, that was recently registered (Feb 1st 2018) with IANA.  It’s really the simplest possible media type to use in order to start adding links to your JSON APIs.  The new media type is application/vnd.restful+json  Adding Hyperlinks The simplicity here is that you can start using this media type with existing APIs to start adding links to your existing objects. JSON objects MAY include a url property to indicate a link to itself JSON objects MAY append _url to properties to indicate related links Example Here’s an existing payload of a e-commerce shopping cart.  It has one product… Read More »RESTful JSON: Adding Links to your APIs

Self Descriptive HTTP API in ASP.NET Core: Hypermedia Clients

This post is in my Self Descriptive HTTP API in ASP.NET Core series. It demonstrates how to design an HTTP API like a regular HTML website. This specific posts covers hypermedia clients. If you’re new to this series, here are earlier posts to get up to speed: Intro Object as Resource Hypermedia Siren HATEOAS If you have any questions, please follow me on Twitter. Hypermedia Clients My perception is that most people new to hypermedia driven APIs think that consuming hypermedia happens via a magic library. Or via some code generation that ultimately gives you a client library that understands every endpoint. I’m not… Read More »Self Descriptive HTTP API in ASP.NET Core: Hypermedia Clients