commit | 62835a2e7209a6c796d5a151831de976ac9dcdb1 | [log] [tgz] |
---|---|---|
author | Natalie Weizenbaum <nweiz@google.com> | Fri Aug 17 15:44:01 2018 -0700 |
committer | GitHub <noreply@github.com> | Fri Aug 17 15:44:01 2018 -0700 |
tree | 811bc2e117f729f1e7c0dc8453177d65e639d8f7 | |
parent | 5675c97fa64b7f331db691b085a515173b832c30 [diff] |
Release 0.1.0+5 (#9)
shelf_proxy
is a Shelf handler that proxies requests to an external server. It can be served directly and used as a proxy server, or it can be mounted within a larger application to proxy only certain URLs.
import 'package:shelf/shelf_io.dart' as shelf_io; import 'package:shelf_proxy/shelf_proxy.dart'; void main() { shelf_io.serve(proxyHandler("https://www.dartlang.org"), 'localhost', 8080) .then((server) { print('Proxying at http://${server.address.host}:${server.port}'); }); }