ResponseFuture extension Extensions Error handling
Extensions on Future<http.Response> to allow usage of some methods from RestResponse as a shortcut.
- on
-
- Future<
Response>
- Future<
Properties
-
jsonBody
→ Future<
Object?> -
Available on Future<
Returns the json object decoded from response body by calling RestResponse.jsonBody after converting the response to RestResponse.Response> , provided by the ResponseFuture extensionno setter -
jsonBodyAsync
→ Future<
Object?> -
Available on Future<
Returns the json object decoded asynchronously from response body by calling RestResponse.jsonBody after converting the response to RestResponse.Response> , provided by the ResponseFuture extensionno setter
Methods
-
data<
T extends Object> () → Future< T?> -
Available on Future<
Returns the deserialized response body by calling RestResponse.deserializeBody after converting the response to RestResponse.Response> , provided by the ResponseFuture extension -
dataAsync<
T extends Object> () → Future< T?> -
Available on Future<
Returns the asynchronously deserialized response body by calling RestResponse.deserializeBodyAsync after converting the response to RestResponse.Response> , provided by the ResponseFuture extension