接口格式“x-www-form-urlencoded”“form-data”這里不做描述(百度搜索即可)。
“x-www-form-urlencoded”“form-data”在頁面顯示都為formdata格式,但是在jemter 中的請求格式稍有不同
1、form-data格式在jmeter請求中需要勾選“Use multipart/form-data”
“x-www-form-urlencoded”格式在jmeter請求中無需勾選設置,可對post請求直接使用Parameters設置。
2、兩者在請求設置的區別:
“form-data”請求頭為Content-Type:application/json“
“x-www-form-urlencoded”格式請求頭為application/x-www-form-urlencoded;或不設置Content-Type