http/http library
The parent HTTP library that exposes all the constituting libraries.
Classes
- AuthorizationUser
- BinaryFileFormField
-
Binary file field in the
multipart/form-data
- BinaryFileListFormField
- ByteResponse
- Response that writes the bytes provided in body to the response.
- CastableStringMap
- Context
- Per-request context object that encapsulates all the data corresponding to a HTTP request and provides a way to write response. It provides various convenience methods and getters to access HTTP request data:
- Controller
- Controller defines the interface all Jaguar controllers must implement.
-
FileFormField<
T> -
FormField<
T> -
Abstract class for fields on
multipart/form-data
- GroupBuilder
-
Idied<
T> - Interface to require that Model must contain an Id
-
Interceptor<
Result> - An interceptor based on Dart class.
- JaguarHttpHeaders
- Class to hold HTTP headers
- JaguarMapCoder
- Encrypts the Map using encrypter. Signs the Map using signer. The final result is made HTTP friendly by Base64 URL encoding.
- JaguarSessionManager
- A stateless cookie based session manager.
- MapCoder
- Codes, encrypts and signs the give Map.
- MimeType
- identifies the type of content of a message
- MimeTypes
- A namespace class to expose mime type specific features
- Muxable
- PasswordUser
- Interface for a user model with a password
- PathParams
- Class to hold path parameters
- QueryParams
- Class to hold query parameters
- Redirect
- Response that redirects to the URI specified by body
- Request
- Request contains information about HTTP request
-
Response<
ValueType> - HTTP response. A route handler must respond to HTTP requests by producing a Response object.
- Route
- Helps builds a route handler with its interceptors and exception handlers
- Session
- A per-request object containing session information of the request
- SessionIo
- Reads and writes session data to Context
- SessionIoAuthHeader
- Reads and writes session data from authorization header
- SessionIoCookie
- Reads and writes session data from cookies
- SessionIoHeader
- Reads and writes session data from cookies
- SessionManager
- Session manager to parse and write session data
- SkipResponse
- StreamResponse
- Response that writes the stream of bytes provided in body to the response.
- StringFormField
-
String field in the
multipart/form-data
- StringResponse
- Response that writes the bytes provided in body to the response.
- TextFileFormField
-
Text file field in the
multipart/form-data
- TextFileListFormField
- UserEmail
- AuthorizationUser that uses email as authenticationId and unique record id as authorizationId
-
UserFetcher<
UserModel extends AuthorizationUser> - Interface to fetch user model by authentication and authorization IDs.
- UserUsername
- AuthorizationUser that uses username as authenticationId and unique record id as authorizationId
- UserUsernameEmail
- AuthorizationUser that uses username and email as authenticationId and unique record id as authorizationId
Functions
-
wsEcho(
) → RouteHandler -
wsRespond<
T> (WsOnConnect onConnect, {Encoding? encoding}) → RouteHandler -
wsStream<
T> (WsOnConnect onConnect) → RouteHandler -
Data read from
stream
is sent to the websocket.
Typedefs
-
Converter<
T, F> = T Function(F d) -
ExceptionHandler
= FutureOr<
void> Function(Context ctx, dynamic exception, StackTrace trace) - A function that shall be called when an exception occurs when processing a route.
- MimeTypeDetector = String? Function(File f)
-
RouteHandler<
RespType> = FutureOr< RespType> Function(Context context) - Prototype for Route handler. A route handler is a function that shall be invoked when a HTTP request with matching path is received.
-
RouteInterceptor
= FutureOr<
void> Function(Context ctx) - Prototype of route interceptor. A router interceptor is a function that runs before or after the route handler.
-
WsOnConnect<
T> = FutureOr< T> Function(Context ctx, WebSocket ws) - WsResponder = FutureOr Function(dynamic data)