dvonlehman / express-request-proxy

Advanced streaming http request proxy middleware for Express with support for custom routes, caching, and response transforms.
96 stars 38 forks source link

Redirecting POST not working #6

Open jazarja opened 8 years ago

jazarja commented 8 years ago

I'm trying to redirect POST request using requestProxy, but couldn't make it work.

Here is my code

router.post('/api/v1/device/register',
    requestProxy({
         url: "http://localhost:3000/api/v1/user/activation"
    }));

Request log

POST /api/v1/device/register 408 5449.497 ms - 975
POST /api/v1/user/activation 400 5455.902 ms - 605

I don't know why the destination url serving HTTP error 400. Please help.

dvonlehman commented 8 years ago

Hello sorry, for the belated reply. See https://github.com/4front/express-request-proxy/issues/9#issuecomment-188862038