Get JSON data for submitting HTML form using HTTP POST

I am trying to get JSON data by clicking a button

Here is the HTML for it

<html>
<title> </title>
<body>  
<h2> Main API - http://api.kalendern.se/api</h3>
<form method="get" enctype="application/json; charset=utf-8" action="http://api.example.com" border="1">
    <input type=submit value="Show Main API"> </td>
</form>
</body>
</html>

I get XML data.

However, I need JSON data. How can I achieve this?

Is the enctype parameter that I set as the content type?

If not, what is the difference and what is the correct value to get JSON data?

thank

Dev.

+5
source share
1 answer

However, I need JSON data. How can I achieve this?

To get it directly, it depends on the service. The URL of the documentation provided leads to 404.

, , XML JSON, , API. , , (, YQL).

enctype, , ?

... . "application/x-www-form-urlencoded" "multipart/form-data".

+3

All Articles