Pass redirection as callback

Fix issue #14 

Passing redirection as a callback function prevents it to be called before POST request has been issued. Otherwise, on slow networks, redirection is effective before POST request and it leads to an internal server error at best or really strange behaviour at worst.