Skip to content
Jackson Mooring edited this page Dec 30, 2020 · 1 revision

Responder

A tiny lightning fast server-side framework for dart.

Getting Started

import 'package:responder/responder.dart';
var app = new Responder();

app.get('/a{dynamic}/route', (req, res) {
  res.headers({
    "Content-type": "application/json",
    "x-foo": "bar",
  })
  res.send("Hello, World! ${req.params.dynamic}")
});

app.listen(3000, (port) => print("listening on $address"));

API Reference

Responder()

.get

.post

.put

.delete

.head

.options

.patch

Request

.id

.params

.headers

.hostname

.method

.protocol

.url

.body

.query

.is404

Response

.code

.header(name, value)

.headers(Map<Name, Value>)

.getHeaders()

.type(type)

.hasHeader(headerName)

.removeHeader(headerName)

.redirect(code, dest)

.send(data)

.sent