Making Requests
GET Request
final res = await ApinionClient.get('/posts/1');
POST Request
final res = await ApinionClient.post('/posts', body: {...});
PUT / PATCH / DELETE
Supported with similar structure using ApinionClient.put
, patch
, and delete
.
Each response returns a BaseApiResponse
:
if (res.isSuccess) {
print(res.responseData);
} else {
print(res.errorMessage);
}