You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to be able to be able to get the API response code returned from calls (post, get, put, ...). This would allow me to use the response code in order to make decisions depending on the type of response (200 vs 201, etc.).
I've got some ideas around how to accomplish this and can open a draft PR
The text was updated successfully, but these errors were encountered:
Hey @mwiggins-casa, good call, indeed at the moment we can only get the response codes for errors, but not for successful calls. I just realized this recently and this is definitely something we need :)
Possible solutions that come to my mind would be to have a variant for get post/ put calls that returns a tuple (a,b) a being the ResponseData or status code and B the T:Decodable model. One other way would be to to have a NetworkingResponse variant that would have the mapped model inside for example.
Feel free to open a PR, contributions are always welcome of course. And also feel free to reach out if you want help/feedback or just discuss the api.
I'd like to be able to be able to get the API response code returned from calls (post, get, put, ...). This would allow me to use the response code in order to make decisions depending on the type of response (200 vs 201, etc.).
I've got some ideas around how to accomplish this and can open a draft PR
The text was updated successfully, but these errors were encountered: