Skip to content

Building HTTP services with other than HTTP Verbs ("Web APIs") #80

@SpaceShot

Description

@SpaceShot

Many teams can make great use of the HTTP verbs such as GET, POST, DELETE and build a fine API, This includes restful, resource, or even RPC style APIs.

However, I run into issue when I encounter teams that really should be using something like chunked transfer encoding or a push stream (and I admit to not be fully versed on these terms).

This is partially inspired by a quote from Microsoft MVP Filip W (https://twitter.com/filip_woj):
"A lot of people think that ASP.NET Web API is basically a fancy framework for building APIs – which couldn’t be further from the truth."
(https://www.strathweb.com/2013/01/asynchronously-streaming-video-with-asp-net-web-api/)

I believe that teams struggle for a few reasons:

  • Lack of familiarity with "other" methods of HTTP transfer besides the well-known verbs
  • ASP.NET Web API naming makes it easy to miss that it's an abstraction of HTTP more than "just an api framework"
  • Lack of understanding that ASP.NET is but one player in the symphony of .NET, IIS, and Windows Server that all must be lined up to work. This may mean increasing limits on data sizes and/or OS settings that could be located in system.webserver or IIS (or both) that might be locked down by machine.config and Windows Server OS settings set long ago as "corporate policy". This leads teams to just give up and say it can't be done in Web API.

Final note: All of the above applies to ASP.NET Core MVC as well. But recall many developers are continuing to support or build new ASP.NET 4.x applications every day.

Some reference articles I am using:
https://www.codeproject.com/Articles/1180464/%2fArticles%2f1180464%2fLarge-JSON-Array-Streaming-in-ASP-NET-Web-API

https://www.strathweb.com/2013/01/asynchronously-streaming-video-with-asp-net-web-api/

http://gigi.nullneuron.net/gigilabs/streaming-data-with-asp-net-web-api-and-pushcontentstream/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions