HttpHelper class

General functions for sending http requests (post, get, multipart, ...)

Constructors

HttpHelper()
factory

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

doGetRequest(Uri uri, {User user, QueryType queryType = QueryType.PROD}) Future<Response>
Send a http get request to the specified uri. The data of the request (if any) has to be provided as parameter within the uri. The result of the request will be returned as string. By default the query will hit the PROD DB
doMultipartRequest(Uri uri, Map<String, String> body, Map<String, Uri> files, User user, {QueryType queryType = QueryType.PROD}) Future<Status>
Send a multipart post request to the specified uri. The data / body of the request has to be provided as map. (key, value) The files to send have to be provided as map containing the source file uri. As result a json object of the "type" Status is expected.
doPostRequest(Uri uri, Map<String, String> body, User user, {QueryType queryType = QueryType.PROD}) Future<Response>
Send a http post request to the specified uri. The data / body of the request has to be provided as map. (key, value) The result of the request will be returned as string.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Constants

FROM → const String
"anonymous"
USER_AGENT → const String
"Dart API"