Okay so I need two sets of endpoints.
-
Okay so I need two sets of endpoints.
One set is RPCs-- eg javascript Fetch is used and JSON is returned.
One set is HTML forms-- a <form> is used and <submit> is hit, and a new page loads.At the moment these are all /actions/endpointname.
What would be the sensible way to do this?
/actions and /forms ?
Identical endpoints, but rpcs take an &rpc=1 term? Or forms take a &html=1 term? Actually that might be better because I could combine functions in the router.
-
Okay so I need two sets of endpoints.
One set is RPCs-- eg javascript Fetch is used and JSON is returned.
One set is HTML forms-- a <form> is used and <submit> is hit, and a new page loads.At the moment these are all /actions/endpointname.
What would be the sensible way to do this?
/actions and /forms ?
Identical endpoints, but rpcs take an &rpc=1 term? Or forms take a &html=1 term? Actually that might be better because I could combine functions in the router.
I got too many responses to this to respond to each one individually so I just wanna say *all* the replies I got to this were really good and helpful, thank you
-
undefined Oblomov ha condiviso questa discussione