Big Bang

Single purpose media types and reusability

The one great thing about twitter is that you quickly find out what you failed to explain clearly 🙂  My efforts in advocating for single purpose media types failed to clarify that by single purpose, I am not suggesting that these media types should not be re-usable.  Let me try and explain. My realization was triggered by @inadarai ‘s […]

Kwick-e-Mart

Self-descriptive, isn’t. Don’t assume anything.

With the recent surge of interest in hypermedia APIs I am beginning to see the term “self-descriptive” thrown around quite frequently.  Unfortunately, the meaning of self-descriptive is not exactly self-descriptive, leading to misuse of the term.  Consider the following HTTP requests, Example 1 Example 2: I suspect a fair number of people will be surprised […]

JSON

Returning raw JSON content from ASP.NET Web API

In a previous post I talked about how to send raw JSON to a web API and consume it easily.  This is a non-obvious process because ASP.NET Web API is optimized for sending and receiving arbitrary CLR object that then get serialized by the formatters in the request/response pipeline.  However, sometimes you just want to have more […]

Funky Web API Dance

Making your ASP.NET Web API funcky with an OWIN appFunc

The OWIN specification defines a delegate called appFunc that allows any OWIN compatible host to work with any OWIN compatible application.  This post shows you how to turn an ASP.NET Web API into an AppFunc. AppFunc is defined as , using AppFunc = Func<IDictionary<string, object>,Task>; In other words, a function that accepts an object that implements IDictionary<string,object> […]

Boy JSON

Posting raw JSON to Web API

I see questions almost weekly on StackOverflow where someone is trying to POST JSON and receive it as a string.  The problem is that Web API has two modes, “serialized object” and “HTTP message”.  Receiving raw JSON as a string falls between the two. Usually the question goes something like, “Why does the jsonBody parameter in the […]

Can a HTTP cache serve a response?

Caching is hard, draw me a picture–Updated

This is my attempt to make the HTTPbis caching rules more accessible and hopefully shine a light on how powerful HTTP caching can be. I’ve been working on a Pluralsight course that talks about how to use the Microsoft HttpClient library.  One of the areas I cover is how to take advantage of HTTP caching.  […]

Katana

Experiments with Katana

A few months ago I put up a site http://hypermediaapi.com with the intention of using it as place to aggregate links to all things hypermedia related. I built the site using Web API because a) I know how to use it, and b) I wanted to prove a point that a Web Site is really […]

Serialization

Troubleshooting serialization problems in Web API

I see many questions on Stackoverflow and the MSDN forums where people are having difficulty because the objects they are trying to return from there API are not being serialized as they expect.  Consider you have an API action that looks like this: What are you supposed to do to debug what is going wrong […]

footer bg

Let's Talk About Your Project

Ready to take your next development project to the next level? Click here to see how Bizcoder can bring your vision to life.

Case Studies

Copyright @ 2024 Kaynes