kite_http

Last updated:

0 purchases

kite_http Image
kite_http Images
Add to Cart

Description:

kite http

kite_http #



Features #

Middleware
Support for custom middleware
RegExp Routing
Uses Regex for routing

Example #
void main() {
final server = KiteServer();

server.use(middleware);

server.handle(
HandlerMetadata(
RegExp(
r"(\/)?",
multiLine: true,
caseSensitive: false,
),
"GET",
),
handler,
);

server.listen();
}

void middleware(Request req, Response res, Function() next) async {
next();
}

void handler(Request req, Response res) async {
final body = await req.json;

return res.json(body);
}

copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.