This PR is a sugestion to make it easier to handle HTTP responses from API, nowadays you have just a few statuses (200, 401 and 404) mapped, but when I was developing #11 I came across a few other like 400, 422, 201.
The idea is pretty simple, it's just to encapsulate the response in a new class that gives us some helper methods like success?, stauts_code and body. In the feature, you may handle content-types translation there too.
This PR is a sugestion to make it easier to handle HTTP responses from API, nowadays you have just a few statuses (200, 401 and 404) mapped, but when I was developing #11 I came across a few other like 400, 422, 201.
The idea is pretty simple, it's just to encapsulate the response in a new class that gives us some helper methods like
success?
,stauts_code
andbody
. In the feature, you may handle content-types translation there too.