Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending parameter with POST requests ,when content-type is multipart/form-data

Tags:

post

jmeter

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.

enter image description here

like image 723
Tanmay Bhattacharya Avatar asked Jul 21 '16 19:07

Tanmay Bhattacharya


1 Answers

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:

  1. Tick "Use multipart/form-data for POST" box
  2. Remove all `Content-Disposition" lines

Multipart Form Data

Multipart request

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.

like image 58
Dmitri T Avatar answered Oct 25 '22 05:10

Dmitri T