Closed cjstehno closed 7 years ago
Undertow has built in proxy support as a handler and various clients. This would require the proxy to be configured at server start, so probably need to investigate using the client part as part of the expectation chain - either off of response or as a separate branch off of request.
Seems that this way would allow proxying specific requests and treating other as normal.
Is there anything useful to do with proxy other than just pass the request and response through it?
Add support for path wildcard string '*' (ends up as any path matcher)
expectations {
get('/other').proxy('http://something.else/another')
}
expectations {
any('*').proxy(...)
}
proxy is similar to response branching point
A second erasatz server could be setup to handle the proxied requests:
expectations {
get('/another').responds(...)
}
or the 'proxy' could re-route to the same server, just a different path
middleman.expectations {
get('/alpha').proxy('/bravo')
get('/bravo').responds(...)
}
This allows number of servers to be minimized
This is not needed. Closing.
TBD