I'm using a javascript library which has two ways of sending POST requests
1. using javascripts FormData, content-type: multipart/form-data
2. or as JSON within the body, content-type: application/json
>From the Mojolicious side they both work - I can get a parameter 'foo':
1. with $c->param('foo')
2. with $c->req->json->{foo}
>From the javascript side there is no advantage to either way, they both
work as needed. From the Mojolicious side, Is there any advantage to using
either way?
The system is currently set up just for use by browser, but there is an
idea to develop an API in the future; would that make either of the options
more attractive?
Any advice on the "right" way to do this would be very much appreciated.
Kind Regards,
Myf White
*Email:* [email protected]
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.