Genie Discord forum

Author AvatarJS
7/1/2023, 5:47:08 PM

Is there a Genie -based technique to create a form that sends json data as its POST? I'd like the route target of a Genie web page form to be a Genie REST API endpoint. I could do the json work in the webpage as javascript but before I resort to that I'd like to know if it's possible using the Genie framework and julia instead of javascript.

Author AvatarPere
7/3/2023, 9:09:48 AM

If I understand correctly, you want to send form data in JSON format from the browser.

I believe you can only do that with Javascript, as the formatting needs to be performed in the browser page.

On the other hand, you can certainly send JSON data from the server to the browser via an API endpoint

Author AvatarJS
7/5/2023, 8:33:46 PM

Thanks, I just wanted confirmation javascript was the way to go.