go_online 0.2.4
go_online: ^0.2.4 copied to clipboard
This package provides a GoOnline class that can be used to make HTTP requests to a RESTful API. The class is designed to simplify the process of sending HTTP requests by abstracting away the implement [...]
0.2.4 #
- Describe initial release.
This package provides a
GoOnlineclass that can be used to make HTTP requests to - a RESTful API. The class is designed to simplify the process of sending HTTP
- requests by abstracting away the implementation details of the
httppackage. - The
GoOnlineclass has methods for sendingGET,POST,PUT, andDELETE - requests to an API. The base URL of the API can be set using the
urlproperty, - and the
getToken()method can be used to retrieve an authentication token from - the device's
SharedPreferences. ThepostData()method sends aPOSTrequest - to the API with some data, while the
getData()method sends aGETrequest. The updateData()anddeleteData()methods sendPUTandDELETErequests respectively.- The
GoOnlineclass also sets the required headers for the requests, including the Content-type,Accept, andAuthorizationheaders. TheContent-typeandAccept- headers are set to
application/json, and theAuthorizationheader includes the authentication token. - Overall, this package provides a convenient and easy-to-use way of sending HTTP requests to a RESTful API,
- making it ideal for use in
- Flutter projects that need to communicate with a server.