Commit Graph

3 Commits

Author SHA1 Message Date
hunteraraujo
b0bd42a57e Update RestApiUtility to allow dynamic baseURL
Modified RestApiUtility to include a method for updating the base URL dynamically. This allows the application to adapt to changes in the API's base URL without requiring a restart.
2023-09-02 17:42:35 -07:00
hunteraraujo
7a817f4989 Remove getList implementation 2023-09-02 15:22:08 -07:00
hunteraraujo
0dcdaaf641 Add RestApiUtility Class for HTTP Requests
This commit introduces a new utility class, RestApiUtility, designed to encapsulate all the HTTP request operations.

- Created RestApiUtility class with a constructor that accepts a base URL.
- Added get method to perform GET requests and return data as a Map.
- Added getList method to perform GET requests and return data as a List.
- Added post method to perform POST requests with payload and return data as a Map.

The class uses the http package for making network calls and dart:convert for JSON serialization and deserialization. This centralized approach makes it easier to manage API calls and handle errors across the application.
2023-08-31 14:46:01 -07:00