接口格式“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