如何通过API与JSON主体一起在Jmeter中上传PDF文件作为请求,而无需将PDF文件转换为bytecode
有人可以帮助我在使用Jmeter的API请求上上传PDF文件以及JSON主体吗?
JSON Body:- {
"name" :"xyz",
"token" : "123OuvP4"
}
Pdf file name - PT_001.pdf
API URL - apiq-bbmma-stq.azure-api.net/DocMqmt/UploadDocument
Header Manager : - Content-Type:- multipart/related; Boundary:-"Aa0b12x"
请指导我如何执行此操作,而无需将PDF文件转换为字节码
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有得到您的要求。您应该在Multipart请求的单独的“部分”中发送PDF文件。
是 multipart content-type
如果 构建请求手动尝试使用 http请求 sampler and 。更多信息:带有jmeter的记录文件上传
I'm not getting your requirement. You should be sending the PDF file "as it is" in a separate "part" of the multipart request.
In case of Multipart Content-Type you need to send the message like:
If you cannot build the request manually try just recording it using HTTP(S) Test Script Recorder, just make sure to copy the PDF file to JMeter's "bin" folder before uploading, this way JMeter will capture the request and generate proper HTTP Request sampler and HTTP Header Manager. More information: Recording File Uploads with JMeter