mardi 1 octobre 2019

Browser Form Behavior

Normally I use JSON API and SPA for when I make web apps, but I am trying to learn how to use the more simple method server-side template-ing and default form behavior.

Right now I am doing something very similar to what is seen here. The only difference is that i changed the action to "/" in the form for simplicity and handle the GET and POST from the same Handler (filtering by method type).

The initial web page renders fine, the data gets sent correctly in a POST, I answer the POST with a just a 200 but then my webpage goes blank.

How do i tell the browser to keep or rerender the original page? Do i need to send an HTML response to the POST? Something other than a 200?




Aucun commentaire:

Enregistrer un commentaire