iron-meteor / iron-router

A client and server side router designed specifically for Meteor.
MIT License
1.98k stars 413 forks source link

post to serverside route forces client to the posts action url #1591

Open dpatte opened 7 years ago

dpatte commented 7 years ago

I have defined a serverside route and I have a client form in the same app that posts to that route (a requirement for a 3rd party api). The form works, but the client page also redirects to the specified route (which shows as empty). Can I prevent the client page from redirecting, or how can I redirect the client to a different route.

dpatte commented 7 years ago

I have tried using this.render('home') (does nothing), and Router.go (which fails). I know its odd with all that Meteor does without using REST that I would like to use REST to post to my own server from my client, but this is the standard protocol within in several APIs, in particular STRIPE and PAYPAL. The issue here is that if a client side POSTS a form to the serverside route, the data does get to the serverside (works with both iron router, and with http-methods), but in both cases, the client is also redirected to that route. I hoped the client route would not be affected.