Tuesday, December 12, 2017

ObjectResult versus OkResult regarding Observables

return Ok(null); and return Ok(true); differ from return Ok(); in that the later is of OkResult in a .NET Core MVC implementation and the first two are of ObjectResult. As best as I can tell the Angular HttpClient and Observables can't handle the OkResult meaning that you have to hand back something like null or true from REST verbs like PUT or DELETE which should really be fire and forget. (return nothing!) I can't find a way out of this pit and this is exactly the sort of weird minutia that only I care about. Whatever.

No comments:

Post a Comment