RFC 點擊打開鏈接
通讀全文,更好的理解get/post請求和傳遞數據。
--------multipart/form-data
The content type "application/x-www-form-urlencoded" is inefficient for sending large quantities of binary data or text containing non-ASCII characters.
表單內容類型"application/x-www-form-urlencoded"不能用來發送大量的二進制數據或者包含非ASCII字符的文本。
The content type "multipart/form-data" should be used for submitting forms that contain files, non-ASCII data, and binary data.
而表單內容類型"multipart/form-data"用來提交文件、非ASCII字符數據和二進制數據。
被設計用來提交文件、非ASCII字符數據 和 大量二進制數據。
常見用法,Http的post方式提交數據。
--------application/x-www-form-urlencoded
This is the default content type. Forms submitted with this content type must be encoded as follows:
默認類型。表單在提交前要按照下面的方式編碼。
Control names and values are escaped(轉義). Space characters are replaced by `+', and then reserved characters are escaped as described in [RFC1738],
section 2.2: Non-alphanumeric characters are replaced by `%HH', a percent sign and two hexadecimal digits representing the ASCII code of the character.
Line breaks are represented as "CR LF" pairs (i.e., `%0D%0A').
The control names/values are listed in the order they appear in the document.
The name is separated from the value by `=' and name/value pairs are separated from each other by `&'.
理解就是URLEncode,常見用法Http的get請求url編碼;
==========其他人的理解==========
是Form的2種編碼方式(encType) 點擊打開鏈接
======MediaType介紹=======點擊打開鏈接
======Http支持的ContentType===點擊打開鏈接
==========================