Tag Archives: Web API

Stop making this API design mistake, stop returning just a value in your API responses. Always return an object | #API Design Tip

Web APIs SHOULD NOT just return a boolean, string or a number/integer value in the response body for any response. Take the following. If you have an operation which for a successful (2XX) creation operation, returns just the value of the new object’s identifier in the response body, like the below examples, then you are opening yourself to… Read More »

ASP.NET Web API – Returning javascript friendly (camelcase) json in two lines of code

Naming conventions of properties defer slightly in .NET and JavaScript. .NET uses?pascal-case and JavaScript uses camel-case. When developing a .NET API all the public properties should use the naming convention pascal-case. However if the service is consumed as an API with a JavaScript client then the json returned should be camel-case. Now you could go and add the… Read More »