jaguar_client library

Provides JsonClient to write concise JSON API client

Classes

AsyncJsonResponse
AsyncResponse<BT>
AsyncStringResponse
AsyncTResponse<BT>
AuthPayload
BearerToken
CookieJar
Delete
Build fluent REST DELETE APIs
ErrorResponse
Get
Build fluent REST GET APIs
Interceptor
JsonClient
JsonResponse
Response of the JSON request
Multipart
MultipartFile
MultipartString
MultipartStringFile
OptionsMethod
Build fluent REST DELETE APIs
Patch
Build fluent REST PATCH APIs
Post
Build fluent REST POST APIs
Put
Build fluent REST PUT APIs
Response<T>
Route
Build fluent REST APIs routes
RouteBase
RouteWithBody
StringResponse
TResponse<T>

Properties

globalClient BaseClient
read / write
isUnauthorized Checker<Response>
read-only
mimeTypeIsHtml Checker<Response>
final
mimeTypeIsJson Checker<Response>
final

Functions

bodyBytesIs(List<int> expected) Checker<Response>
bodyIs<T>(T expected, [bool isEqual(T a, T b)]) Checker<Response<T>>
delete(String url) Delete
encodingIs(String expected) Checker<Response>
get(String url) Get
getEncoderForCharset(String charset, [Encoding fallback = codec.latin1]) Encoding
headersHas(String header, [String value]) Checker<Response>
mimeTypeIs(String expected) Checker<Response>
options(String url) OptionsMethod
patch(String url) Patch
post(String url) Post
put(String url) Put
route(String url) Route
statusCodeIs(int expected) Checker<Response>
statusCodeIsInRange(int lower, int higher) Checker<Response>

Typedefs

After = FutureOr Function(StringResponse response)
Before = FutureOr<void> Function(RouteBase route)
Checker<T> = List<Mismatch> Function(T v)
Performs a check/validation on T
CustomMismatchMessage<T> = String Function(T mismatch)
Customizes message of a Mismatch
ResponseHook<T> = FutureOr Function(Response<T> response)

Exceptions / Errors

EqualityMismatch<T>
MapHasMismatch<T>
Mismatch<M>
A mismatch exception
RangeMismatch<T>