Proxy class
A middleware class that forwards requests (reverse proxies) to an upstream server.
Supports WebSockets, in addition to regular HTTP requests.
Constructors
Properties
- baseUrl → Uri
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpClient → Client
-
The underlying Client to use.
final
- publicPath → String
-
final
- recoverFrom404 → bool
-
final
- recoverFromDead → bool
-
If
true
(default), then the plug-in will ignore failures to connect to the proxy, and allow other handlers to run.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout → Duration?
-
If
null
then no timout is added for requestsfinal
Methods
-
close(
) → void -
handleRequest(
RequestContext req, ResponseContext res) → Future< bool> - Handles an incoming HTTP request.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pushState(
String path, {Iterable? accepts}) → RequestHandler - A handler that serves the file at the given path, unless the user has requested that path.
-
servePath(
String path, RequestContext req, ResponseContext res) → Future< bool> - Proxies a request to the given path on the remote server.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited