dartian_http 1.0.0 copy "dartian_http: ^1.0.0" to clipboard
dartian_http: ^1.0.0 copied to clipboard

HTTP kernel for Dartian with middleware pipeline, CORS, CSRF protection - Built on Shelf

dartian_http #

HTTP kernel for Dartian with middleware pipeline, CORS, CSRF protection - Built on Shelf.

Features #

  • Shelf-based HTTP kernel
  • Middleware pipeline
  • CORS support
  • CSRF protection
  • Request/Response helpers

Installation #

dependencies:
  dartian_http: ^1.0.0

Usage #

import 'package:dartian_http/dartian_http.dart';

// Create HTTP kernel
final kernel = HttpKernel();

// Add middleware
kernel.use(CorsMiddleware(
  allowOrigin: '*',
  allowMethods: ['GET', 'POST', 'PUT', 'DELETE'],
));

kernel.use(CsrfMiddleware());

// Create handler
final handler = kernel.build((request) async {
  return Response.ok('Hello World');
});

// Start server
final server = await serve(handler, 'localhost', 8080);
print('Server running on http://localhost:8080');

Part of Dartian #

This package is part of the Dartian framework.

License #

AGPL-3.0 - See LICENSE for details.

0
likes
130
points
165
downloads

Publisher

verified publisherdartian.org

Weekly Downloads

HTTP kernel for Dartian with middleware pipeline, CORS, CSRF protection - Built on Shelf

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#http #server #middleware #shelf

Documentation

API reference

License

unknown (license)

Dependencies

crypto, dartian_core, dartian_i18n, shelf

More

Packages that depend on dartian_http