How to send HTTP PUT request using Jmeter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to send HTTP PUT request using Jmeter

abhijitgupta123
Hi,
    I want to send HTTP Put request with following three parameters
a) name=ABCD
b) URL=http://somelink.com
c) ICON=http//someicon.com/abc.png

I have filled up values in 'Send parameter with request'  but I am
getting 400 Bad request, url is missing from parameters.

I went through mailing list and tried some of the suggestions
1) Keep name empty and provide only values  (not sure how values will be
picked up against the name ?)
2) Set Content encoding UTF8

If you can provide me screenshot of how to send PUT request, it will be
of great help.

Best Regards,
Abhijit

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to send HTTP PUT request using Jmeter

glinius@live.com
This post has NOT been accepted by the mailing list yet.
This post was updated on .
First of all make sure that you have "PUT" method selected in "Method" drop down.

My expectation is that you're providing incorrect content type.

For instance, if your application expects the request to be in the form of "application/json" and you're sending "text/html" or something like this.

Try adding View Results Tree listener to your test plan and look into response headers. For example, something like below
Accept: image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n
means that the server will accept only GIF and JPG images, all other content types won't be accepted and served.

Once you determine correct content type, add a HTTP Header Manager as a child of your request (if you need to change content type on one request only) or at Thread Group level to affect all request and provide relevant Content-Type header.

Hope this helps.
Reply | Threaded
Open this post in threaded view
|

Re: How to send HTTP PUT request using Jmeter

Flavio Cysne
In reply to this post by abhijitgupta123
Have you tried adding these parameters directly in Raw Body tab of HTTP
Request Sampler, using PUT as method?


2014-04-24 3:36 GMT-03:00 Abhijit Gupta <[hidden email]>:

> Hi,
>    I want to send HTTP Put request with following three parameters
> a) name=ABCD
> b) URL=http://somelink.com
> c) ICON=http//someicon.com/abc.png
>
> I have filled up values in 'Send parameter with request'  but I am getting
> 400 Bad request, url is missing from parameters.
>
> I went through mailing list and tried some of the suggestions
> 1) Keep name empty and provide only values  (not sure how values will be
> picked up against the name ?)
> 2) Set Content encoding UTF8
>
> If you can provide me screenshot of how to send PUT request, it will be of
> great help.
>
> Best Regards,
> Abhijit
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to send HTTP PUT request using Jmeter

amador.criado
This post has NOT been accepted by the mailing list yet.
This post was updated on .
In reply to this post by abhijitgupta123
I'm using JMeter 2.13 and facing with similar problem. This is How I've solved it:

 - Setting Content-Type header to text/plain in the HTTP Header Manager
 - Changing Content-Encoding to UTF-8
 - In the parameters tab, add the params without name and separated with ampersand character (&)

Screenshot JMeter PUT request example:



Hope it helps!
Reply | Threaded
Open this post in threaded view
|

Re: How to send HTTP PUT request using Jmeter

mitsm
This post has NOT been accepted by the mailing list yet.
Why are you still using 2.* version of jmeter when there is a latest 3.2 version avaialble with much better UI and plugins and added features. And more so, why are you posting on a post of 2014. Try making a new post and try using a newer feature of jMeter.
Reply | Threaded
Open this post in threaded view
|

Re: How to send HTTP PUT request using Jmeter

amador.criado
This post has NOT been accepted by the mailing list yet.
This post was updated on .
@mitsm If you read carefully my last post you're going to realize that I have solved the problem (creating a new post is not necessary...)
And yes, I'm currently using version 3.2 of JMeter and is much better but the problem persists and in my opinion my approach is useful.