使用 POST 请求发送参数,当内容类型为 multipart/form-data 时 [英] Sending parameter with POST requests ,when content-type is multipart/form-data
问题描述
我是 JMeter 的新手.我正在尝试创建一个测试计划,其中一个请求是包含一些参数的 POST 请求,请求标头中的内容类型是 Multipart/Form-data.
我正在从 fiddler 复制标头/参数,因为 HTTP 代理记录器不工作.
请查看我当前设置的图像.使用它我无法获得所需的响应.
根据
关于代理记录器不工作",我从未遇到过任何问题,因此可能是配置错误或类似的问题.有些人发现 JMeter Chrome 扩展程序更易于使用.
I am new to JMeter. I am trying to create a test plan ,one of the requests is a POST request containing some parameter, the content type in the request header is Multipart/Form-data.
I am copying the headers/parameters from fiddler because the HTTP proxy recorder is not working.
Please see the image for the current settings I have.I am not able to get the required response using it.
As per HTTP Request Sampler Documentation
Use multipart/form-data for HTTP POST
Use a multipart/form-data or application/x-www-form-urlencoded post request
So all you need to do is:
- Tick "Use multipart/form-data for POST" box
- Remove all `Content-Disposition" lines
In regards to "proxy recorder not working", I have never experienced any problems with it so it might be misconfiguration or something like this. Some people find JMeter Chrome Extension easier to use.
这篇关于使用 POST 请求发送参数,当内容类型为 multipart/form-data 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!