logoalt Hacker News

bob1029today at 1:03 PM2 repliesview on HN

This is better solved with the post redirect get pattern.


Replies

CodesInChaostoday at 7:05 PM

The redirect pattern makes sense for a POST request that creates a resource, where you can then redirect to the newly created resource.

QUERY on the other hand makes sense for cases where the request doesn't cause any state changes on the server, and there is no resource to redirect to.

dirousseltoday at 4:49 PM

That is the good old fashion workaround. But why is it better than a form causing an HTTP QUERY.

If we can do QUERY forms, it would be an ideal time to add JSON encoding for forms.