simplehttp 0.0.1 copy "simplehttp: ^0.0.1" to clipboard
simplehttp: ^0.0.1 copied to clipboard

outdated

A simple http server

A simple http server.

#Example

import 'package:simplehttp/http_application.dart';

void main() {
  final application = HttpApplication(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
0
pub points
0%
popularity

Publisher

unverified uploader

A simple http server

License

unknown (LICENSE)

Dependencies

path

More

Packages that depend on simplehttp