simplehttp 0.0.2

Dart native
Flutter Android iOS

A simple http server

A simple http server.

Example #

import 'package:simplehttp/simplehttp.dart';

void main() {
  final application = SimpleHttp(port: 8080);
  application.get('/', (request, response) {
    response.status(200).json({
      'Test': 1,
    });
  });

  application.get('/:id', (request, response) {
    print(request.segments()[0]);
    response.status(200);
  });

  application.post('/post', (request, response) async {
    print(await request.body());
  });

  application.start();
}

1
likes
70
pub points
0%
popularity

A simple http server

Documentation

API reference

Uploader

e.yavuz2001@gmail.com

License

BSD (LICENSE)

More

Packages that depend on simplehttp