Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JMeter POST returns 415 - Unsupported Media Type

Tags:

rest

jmeter

Well it's one step forward and two steps back for me. Thanks to you guys, I finally got the GET for my webservice working in JMeter. Now I'm trying a POST, and once again I'm not getting anywhere.

I'm using a HTTP Request and made the POST body as small as possible: <the_tag></the_tag>.
I even took the xml out and just used text.
No matter what's in the body, I get the 415 error.
What am I missing?
My implementation is HC3, protocol https, and I don't have anything else selected (other than the POST, of course). I also set the Content-Type to text/xml.

P.S. I should add that this POST works fine in SoapUI, so I don't think it's a server issue.

like image 384
CNDyson Avatar asked Jan 23 '13 23:01

CNDyson


1 Answers

Did you check the content type of your request ?

What is it ? What should it be ? To set it, add a header manager as child of your sampler and set :

  • content-type in column 1

  • application/xml in column 2

If you're looking to learn jmeter correctly, this book will help you.

like image 100
UBIK LOAD PACK Avatar answered Sep 18 '22 05:09

UBIK LOAD PACK