Is there a convenient way to build a proxy for spe...
# http4k
j
Is there a convenient way to build a proxy for specific routes? Right now I have the following, which seems quite verbose:
Copy code
routes(
        “/api” bind GET to ::proxyRequest,
        “/api” bind PUT to ::proxyRequest,
        “/api” bind POST to ::proxyRequest,
        “/api” bind DELETE to ::proxyRequest,
        “/api” bind OPTIONS to ::proxyRequest,
        “/api” bind TRACE to ::proxyRequest,
        “/api” bind PATCH to ::proxyRequest,
        “/api” bind PURGE to ::proxyRequest,
        “/api” bind HEAD to ::proxyRequest
        // The same for a few other routes
    )