I am attempting to submit a POST request to a server that requires the data to be formatted using JSON. Here is my code:
<form action='myurl.com' method='post' enctype='application/json'>
<input name='name' value='Bob' >
<input name="pet[type]" value='dog'>
<input name="pet[name]" value='buster'>
<input type="submit" value="Submit">
</form>
When I submit, I get the response that it is not formatted in JSON. Is that not what enctype='application/json'
does or am I misunderstanding it? How do I format it using JSON?
Thanks