edge_runtime 0.0.4+2 copy "edge_runtime: ^0.0.4+2" to clipboard
edge_runtime: ^0.0.4+2 copied to clipboard

Runtime APIs for running Dart on Edge function environments.

example/lib/main.dart

import 'package:edge_runtime/edge_runtime.dart';
import 'package:http/http.dart' as http;

void main() {
  // Setup the runtime environment.
  setupRuntime();
}

/// A fetch event handler.
Future<Response> fetchHandler(Request request) async {
  print('do request');
  final r =
      await http.get(Uri.parse('https://jsonplaceholder.typicode.com/todos/1'));
  print(r.body);

  return Response('Hello, world!!', status: 200);
}
0
likes
110
pub points
6%
popularity

Publisher

verified publisherinvertase.io

Runtime APIs for running Dart on Edge function environments.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

freezed_annotation, js, js_bindings

More

Packages that depend on edge_runtime