Why does http default form submission format like & Key=Value?

when a normal http request is made, the default form is generally formatted like this

FormData

Field 1key= Field 1Value

Field 2key= Field 2Value

the data format of the array type may be

FormData

Array name 0x0 element field 1Value

Array name 0x0 element field 2Value

Array name 1"0 element field 1Value

Array name 1"0 element field 2Value

that is, the keyValue format using the & symbol and =

and other more complex data formats are indexed by [].

but this format is not very readable, so why not use the Json format, which is clearer and more readable? What are the reasons for using this format? Is it because of the default format of the http protocol? Or is it a historical question? Or is it the behavior of the browser?


submit using the post method, you should get an array of


according to the data. Although HTTP 1.1 and json were implemented for about the same time around 2000
, complex content was rarely used in the early forms business.

secondly, if you want to send json, set content-type to application/json.


form submission defaults to a GET request, which is passed by concatenating parameters in the form of parameter name = value after url. Default: 'Content-Type':' application/x-www-form-urlencoded'.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e83517-46a22.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e83517-46a22.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?