HttpUtils class

Helper class for http requests

Constructors

HttpUtils()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Properties

client Client
read / write

Static Methods

addQueryParameterToUrl(String url, Map<String, dynamic> queryParameters) → String
Add the given queryParameters to the given url.
deleteForFullResponse(String url, { Map<String, String> queryParameters Map<String, String> headers }) → Future<Response>
Sends a HTTP DELETE request to the given url with the given queryParameters and headers. Returns the full Response object.
deleteForJson(String url, { Map<String, String> queryParameters Map<String, String> headers }) → Future<Map<String, dynamic>>
Sends a HTTP DELETE request to the given url with the given queryParameters and headers. Returns the response as a map using json.decode.
deleteForString(String url, { Map<String, String> queryParameters Map<String, String> headers }) → Future<String>
Sends a HTTP DELETE request to the given url with the given queryParameters and headers. Returns the response as a string.
getForFullResponse(String url, { Map<String, dynamic> queryParameters, Map<String, String> headers }) → Future<Response>
Sends a HTTP GET request to the given url with the given queryParameters and headers. Returns the full Response object.
getForJson(String url, { Map<String, dynamic> queryParameters, Map<String, String> headers }) → Future<Map<String, dynamic>>
Sends a HTTP GET request to the given url with the given queryParameters and headers. Returns the response as a map using json.decode.
getForString(String url, { Map<String, dynamic> queryParameters, Map<String, String> headers }) → Future<String>
Sends a HTTP GET request to the given url with the given queryParameters and headers. Returns the response as a string.
getQueryParameterFromUrl(String url) → Map<String, dynamic>
Fetches the query parameter from the given url. Returns null if none exist.
postForFullResponse(String url, { String body, { Map<String, String> queryParameters Map<String, String> headers }) → Future<Response>
Sends a HTTP POST request to the given url with the given body, queryParameters and headers. Returns the full Response object.
postForJson(String url, { String body, { Map<String, String> queryParameters Map<String, String> headers }) → Future<Map<String, dynamic>>
Sends a HTTP POST request to the given url with the given body, queryParameters and headers. Returns the response as a map using json.decode.
postForString(String url, { String body, { Map<String, String> queryParameters Map<String, String> headers }) → Future<String>
Sends a HTTP POST request to the given url with the given body, queryParameters and headers. Returns the response as a string.
putForFullResponse(String url, { String body, { Map<String, String> queryParameters Map<String, String> headers }) → Future<Response>
Sends a HTTP PUT request to the given url with the given body, queryParameters and headers. Returns the full Response object.
putForJson(String url, { String body, { Map<String, String> queryParameters Map<String, String> headers }) → Future<Map<String, dynamic>>
Sends a HTTP PUT request to the given url with the given body, queryParameters and headers. Returns the response as a map using json.decode.
putForString(String url, { String body, { Map<String, String> queryParameters Map<String, String> headers }) → Future<String>
Sends a HTTP PUT request to the given url with the given body, queryParameters and headers. Returns the response as a string.

Constants

TAG → const String
"HttpUtils"