fanoos_http library

Classes

Response
An HTTP response where the entire response body is known in advance.

Functions

httpDelete<T>({String url, Map<String, String> headers, dynamic bodyParser(String body): plainString, T onOk(dynamic parsedBody), Function onError, T onResponse(Response response), Duration timeout: const Duration(minutes: 2), FutureOr<T> onTimeout()}) Future<T>
Sends a delete http request to the provided url. [...]
httpGet<T>({String url, Map<String, String> headers, dynamic bodyParser(String body): plainString, T onOk(dynamic parsedBody), Function onError, T onResponse(Response response), Duration timeout: const Duration(minutes: 2), FutureOr<T> onTimeout()}) Future<T>
Sends a get http request to the provided url. [...]
httpPatch<T>({String url, Map<String, String> headers, dynamic body, dynamic bodyParser(String body): plainString, T onOk(dynamic parsedBody), Function onError, T onResponse(Response response), Duration timeout: const Duration(minutes: 2), FutureOr<T> onTimeout()}) Future<T>
Sends a patch http request to the provided url. [...]
httpPost<T>({String url, Map<String, String> headers, dynamic body, dynamic bodyParser(String body): plainString, T onOk(dynamic parsedBody), Function onError, T onResponse(Response response), Duration timeout: const Duration(minutes: 2), FutureOr<T> onTimeout()}) Future<T>
Sends a post http request to the provided url. [...]
httpPut<T>({String url, Map<String, String> headers, dynamic body, dynamic bodyParser(String body): plainString, T onOk(dynamic parsedBody), Function onError, T onResponse(Response response), Duration timeout: const Duration(minutes: 2), FutureOr<T> onTimeout()}) Future<T>
Sends a put http request to the provided url. [...]
plainString(String body) String
The default parser is jsonDecode [...]