Skip to content

Instantly share code, notes, and snippets.

@Pajn
Created March 9, 2014 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pajn/9454257 to your computer and use it in GitHub Desktop.
Save Pajn/9454257 to your computer and use it in GitHub Desktop.
Future<Response> helloPost(HttpRequest request) {
return request.toList().then((List<List<int>> buffer) {
var name = new String.fromCharCodes(buffer.expand((i) => i).toList());
name = name.isNotEmpty ? name : 'World';
return new Response("Hello, $name!");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment