我们以jmeter 5.4.1为例子,如果发get请求
接口例子 get
GET /WebServices/WeatherWS.asmx/getSupportCityString?theRegionCode=string HTTP/1.1 Host: ws.webxml.com.cn
那么相关的配置为下图,要将参数输入到参数内,参数内的传参在发送请求时会在url地址后带上参数
接口例子psot
POST /WebServices/WeatherWS.asmx/getSupportCityString HTTP/1.1 Host: ws.webxml.com.cn Content-Type: application/x-www-form-urlencoded Content-Length: length theRegionCode=string
已知请求体发送的请求为:theRegionCode=string 相关的配置为
因为要发送请求头,所以我们要在
填写对应参数:Content-Type: application/x-www-form-urlencoded 注意请求参数要写到消息体数据里,这样请求的内容就会输入到消息体内
原文:https://www.cnblogs.com/weilemeizi/p/14684447.html