jaguar_resty library
Build fluent functional REST API clients
Example: put('/api/book/${id}') .json(book.toMap) .fetch((m) => new Book.fromMap(m));
Classes
- BearerToken
- CookieJar
- ErrorResponse
- Interceptor
- Method
- MethodWithBody
- Multipart
- MultipartFile
- MultipartStreamFile
- MultipartString
- MultipartStringFile
- Response
- An HTTP response where the entire response body is known in advance.
Properties
- globalClient ↔ BaseClient?
-
getter/setter pair
-
no setter
-
mimeTypeIsHtml
→ Checker<
Response> -
final
-
mimeTypeIsJson
→ Checker<
Response> -
final
Functions
-
bodyBytesIs(
List< int> expected) → Checker<Response> -
bodyIs(
String expected) → Checker< Response> -
delete(
dynamic url) → Method - Build fluent REST DELETE APIs
-
encodingIs(
String expected) → Checker< Response> -
get(
dynamic url) → Method - Build fluent REST GET APIs
-
headersHas(
String header, [String? value]) → Checker< Response> -
mimeTypeIs(
String expected) → Checker< Response> -
options(
dynamic url) → Method - Build fluent REST OPTIONS APIs
-
patch(
dynamic url) → MethodWithBody - Build fluent REST PATCH APIs
-
post(
dynamic url) → MethodWithBody - Build fluent REST POST APIs
-
put(
dynamic url) → MethodWithBody - Build fluent REST PUT APIs
-
statusCodeIs(
int expected) → Checker< Response> -
statusCodeIsInRange(
int lower, int higher) → Checker< Response>
Typedefs
- After = FutureOr Function(Response response)
-
Before
= FutureOr<
void> Function(Method 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 = FutureOr Function(Response response)
-
ValueCallback<
T> = void Function(T value)
Exceptions / Errors
-
EqualityMismatch<
T> -
MapHasMismatch<
T> -
Mismatch<
M> - A mismatch exception
-
RangeMismatch<
T>