reactiveui / refit

The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.
https://reactiveui.github.io/refit/
MIT License
8.47k stars 745 forks source link

Support for RFC 7807 - Problem Details for HTTP APIs #470

Closed jimmcslim closed 5 years ago

jimmcslim commented 6 years ago

ASP.NET Core 2.1 will be supporting RFC 7807 - Problem Details for HTTP APIs (see here for more discussion by the ASP.NET Core team). This defines a data structure (the RFC provides for encoding in either JSON or XML) for communicating more information about the cause of an error.

It would be good if Refit supported parsing this in its ApiException? It would need to identify if the response to any non-success HTTP code was of type application/problem+json and deserialize appropriately.

bugproof commented 6 years ago

It would be cool to do it also with ApiResponse somehow without using exceptions.