Fluent extension

Extension che permette di costruire la richiesta con un linguaggio fluent

on

Methods

body(Map<String, dynamic> body) RequestX

Available on RequestX, provided by the Fluent extension

decodeResponseBodyBytes() RequestX

Available on RequestX, provided by the Fluent extension

delete() RequestX

Available on RequestX, provided by the Fluent extension

doIsolateRequest() Future<Validation>

Available on RequestX, provided by the Fluent extension

Esegue la richiesta in un isolate. Se è stata impostata la cache tramite useCache tenta di recuperare il valore dalla cache. Se non esiste, esegue la chiamata e poi salva il valore nella cache usando come id l'url della chiamata.
doRequest<T>() Future<Validation<T>>

Available on RequestX, provided by the Fluent extension

La doRequestfa la chiamata senza isolate Per eseguire la chiamata in un isolate, usare doIsolateRequest()._authoritySe è stata impostata la cache tramite useCache tenta di recuperare il valore dalla cache. Se non esiste, esegue la chiamata e poi salva il valore nella cache usando come id l'url della chiamata.
enableLog(bool enable) RequestX

Available on RequestX, provided by the Fluent extension

get() RequestX

Available on RequestX, provided by the Fluent extension

getResponseBytes() RequestX

Available on RequestX, provided by the Fluent extension

headers(Map<String, String> headers) RequestX

Available on RequestX, provided by the Fluent extension

isHttp() RequestX

Available on RequestX, provided by the Fluent extension

jsonDelete() RequestX

Available on RequestX, provided by the Fluent extension

jsonGet() RequestX

Available on RequestX, provided by the Fluent extension

jsonPatch() RequestX

Available on RequestX, provided by the Fluent extension

jsonPost() RequestX

Available on RequestX, provided by the Fluent extension

jsonPut() RequestX

Available on RequestX, provided by the Fluent extension

params(Map<String, dynamic> params) RequestX

Available on RequestX, provided by the Fluent extension

path(String path) RequestX

Available on RequestX, provided by the Fluent extension

post() RequestX

Available on RequestX, provided by the Fluent extension

put() RequestX

Available on RequestX, provided by the Fluent extension

trustBadCertificatesInDebug(bool trust) RequestX

Available on RequestX, provided by the Fluent extension

useCache({Duration duration = const Duration(seconds: 30)}) RequestX

Available on RequestX, provided by the Fluent extension

Usare per salvare il rilultato nella cache o riottenerlo alla prossiam chiamata. L'id della cache è l'url di chiamata