EmbedIO v2.7.2 Release Notes
Release Date: 2019-04-25 // almost 5 years ago-
Breaking changes
This version replaces the logic of how
WebApiController
works but introducing new Extension Methods and how the Request and Response are handles in the controller's method.The core change is that
WebApiController
is no longer implementing the interfaceIHttpContext
. Instead of this, theWebApiController
contains a propertyHttpContext
where this instance is located. This affect how you can, for example, response a JSON:[WebApiHandler(HttpVerbs.Post, "/api/data")]public async Task\<bool\> PostData() { // previous codereturn await this.JsonResponseAsync(new { error = "Invalid Product" }); // new codereturn await HttpContext.JsonResponseAsync(new { error = "Invalid Product" }); // or using the new virtual methodsreturn await Ok(new { error = "Invalid Product" }); }