You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by David Levine <da...@keas.com> on 2009/10/31 02:00:17 UTC
Can an HTTP Request PUT have query args?
I need to sample an HTTP PUT and send query arguments (parameters). Unfortunately, it seems like the HTTP Request object ignores query arguments unless the method is GET. Do I understand this correctly, and is this by design?
David
Re: Can an HTTP Request PUT have query args?
Posted by Deepak Shetty <sh...@gmail.com>.
That I dont know the answer to :) .
On Fri, Oct 30, 2009 at 7:48 PM, David Levine <da...@keas.com> wrote:
> Right, that makes sense. The part that doesn't seem right, is that if I
> have named parameters on a PUT, they are ignored. Why not send them as
> query arguments?
>
>
> --------------------------------------------------
> From: "Deepak Shetty" <sh...@gmail.com>
> Sent: Friday, October 30, 2009 7:36 PM
>
> To: "JMeter Users List" <jm...@jakarta.apache.org>
> Subject: Re: Can an HTTP Request PUT have query args?
>
> Hi
>> If you want to send parameters with PUT , you must put them in the URL.
>> For
>> PUT the values that you put in the Send parameters section would be sent
>> in
>> the body(without names)
>>
>> regards
>> deepak
>>
>> On Fri, Oct 30, 2009 at 7:29 PM, David Levine <da...@keas.com>
>> wrote:
>>
>> Set up any HTTP Request with method GET, and add a parameter to the "Send
>>> parameters with request" list. Run the sampler, and look at the
>>> resulting
>>> HTTP request (from a listener), and you'll see it appended the parameters
>>> to
>>> the path. Just what I would expect.
>>>
>>> But - simply change the method from GET to PUT and run the same request,
>>> and look at the actual request again. This time, the parameters are not
>>> automatically added to the path.
>>>
>>> I would expect the parameters would be added to the path regardless of
>>> the
>>> method.
>>>
>>> David
>>> --------------------------------------------------
>>> From: "Deepak Shetty" <sh...@gmail.com>
>>> Sent: Friday, October 30, 2009 7:23 PM
>>> To: "JMeter Users List" <jm...@jakarta.apache.org>
>>> Subject: Re: Can an HTTP Request PUT have query args?
>>>
>>>
>>> Seems to work.I put something like /test?a=b in the path .. what do you
>>>
>>>> observe? or are you stating that your server is unable to perform a
>>>> request.getParameter(a) ?
>>>> regards
>>>> deepak
>>>>
>>>> On Fri, Oct 30, 2009 at 6:00 PM, David Levine <da...@keas.com>
>>>> wrote:
>>>>
>>>> I need to sample an HTTP PUT and send query arguments (parameters).
>>>>
>>>>> Unfortunately, it seems like the HTTP Request object ignores query
>>>>> arguments unless the method is GET. Do I understand this correctly,
>>>>> and
>>>>> is
>>>>> this by design?
>>>>>
>>>>> David
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>>
>>>
>>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
Re: Can an HTTP Request PUT have query args?
Posted by David Levine <da...@keas.com>.
Right, that makes sense. The part that doesn't seem right, is that if I
have named parameters on a PUT, they are ignored. Why not send them as
query arguments?
--------------------------------------------------
From: "Deepak Shetty" <sh...@gmail.com>
Sent: Friday, October 30, 2009 7:36 PM
To: "JMeter Users List" <jm...@jakarta.apache.org>
Subject: Re: Can an HTTP Request PUT have query args?
> Hi
> If you want to send parameters with PUT , you must put them in the URL.
> For
> PUT the values that you put in the Send parameters section would be sent
> in
> the body(without names)
>
> regards
> deepak
>
> On Fri, Oct 30, 2009 at 7:29 PM, David Levine <da...@keas.com>
> wrote:
>
>> Set up any HTTP Request with method GET, and add a parameter to the "Send
>> parameters with request" list. Run the sampler, and look at the
>> resulting
>> HTTP request (from a listener), and you'll see it appended the parameters
>> to
>> the path. Just what I would expect.
>>
>> But - simply change the method from GET to PUT and run the same request,
>> and look at the actual request again. This time, the parameters are not
>> automatically added to the path.
>>
>> I would expect the parameters would be added to the path regardless of
>> the
>> method.
>>
>> David
>> --------------------------------------------------
>> From: "Deepak Shetty" <sh...@gmail.com>
>> Sent: Friday, October 30, 2009 7:23 PM
>> To: "JMeter Users List" <jm...@jakarta.apache.org>
>> Subject: Re: Can an HTTP Request PUT have query args?
>>
>>
>> Seems to work.I put something like /test?a=b in the path .. what do you
>>> observe? or are you stating that your server is unable to perform a
>>> request.getParameter(a) ?
>>> regards
>>> deepak
>>>
>>> On Fri, Oct 30, 2009 at 6:00 PM, David Levine <da...@keas.com>
>>> wrote:
>>>
>>> I need to sample an HTTP PUT and send query arguments (parameters).
>>>> Unfortunately, it seems like the HTTP Request object ignores query
>>>> arguments unless the method is GET. Do I understand this correctly,
>>>> and
>>>> is
>>>> this by design?
>>>>
>>>> David
>>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Can an HTTP Request PUT have query args?
Posted by Deepak Shetty <sh...@gmail.com>.
Hi
If you want to send parameters with PUT , you must put them in the URL. For
PUT the values that you put in the Send parameters section would be sent in
the body(without names)
regards
deepak
On Fri, Oct 30, 2009 at 7:29 PM, David Levine <da...@keas.com> wrote:
> Set up any HTTP Request with method GET, and add a parameter to the "Send
> parameters with request" list. Run the sampler, and look at the resulting
> HTTP request (from a listener), and you'll see it appended the parameters to
> the path. Just what I would expect.
>
> But - simply change the method from GET to PUT and run the same request,
> and look at the actual request again. This time, the parameters are not
> automatically added to the path.
>
> I would expect the parameters would be added to the path regardless of the
> method.
>
> David
> --------------------------------------------------
> From: "Deepak Shetty" <sh...@gmail.com>
> Sent: Friday, October 30, 2009 7:23 PM
> To: "JMeter Users List" <jm...@jakarta.apache.org>
> Subject: Re: Can an HTTP Request PUT have query args?
>
>
> Seems to work.I put something like /test?a=b in the path .. what do you
>> observe? or are you stating that your server is unable to perform a
>> request.getParameter(a) ?
>> regards
>> deepak
>>
>> On Fri, Oct 30, 2009 at 6:00 PM, David Levine <da...@keas.com>
>> wrote:
>>
>> I need to sample an HTTP PUT and send query arguments (parameters).
>>> Unfortunately, it seems like the HTTP Request object ignores query
>>> arguments unless the method is GET. Do I understand this correctly, and
>>> is
>>> this by design?
>>>
>>> David
>>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
Re: Can an HTTP Request PUT have query args?
Posted by David Levine <da...@keas.com>.
Set up any HTTP Request with method GET, and add a parameter to the "Send
parameters with request" list. Run the sampler, and look at the resulting
HTTP request (from a listener), and you'll see it appended the parameters to
the path. Just what I would expect.
But - simply change the method from GET to PUT and run the same request, and
look at the actual request again. This time, the parameters are not
automatically added to the path.
I would expect the parameters would be added to the path regardless of the
method.
David
--------------------------------------------------
From: "Deepak Shetty" <sh...@gmail.com>
Sent: Friday, October 30, 2009 7:23 PM
To: "JMeter Users List" <jm...@jakarta.apache.org>
Subject: Re: Can an HTTP Request PUT have query args?
> Seems to work.I put something like /test?a=b in the path .. what do you
> observe? or are you stating that your server is unable to perform a
> request.getParameter(a) ?
> regards
> deepak
>
> On Fri, Oct 30, 2009 at 6:00 PM, David Levine <da...@keas.com>
> wrote:
>
>> I need to sample an HTTP PUT and send query arguments (parameters).
>> Unfortunately, it seems like the HTTP Request object ignores query
>> arguments unless the method is GET. Do I understand this correctly, and
>> is
>> this by design?
>>
>> David
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Can an HTTP Request PUT have query args?
Posted by Deepak Shetty <sh...@gmail.com>.
Seems to work.I put something like /test?a=b in the path .. what do you
observe? or are you stating that your server is unable to perform a
request.getParameter(a) ?
regards
deepak
On Fri, Oct 30, 2009 at 6:00 PM, David Levine <da...@keas.com> wrote:
> I need to sample an HTTP PUT and send query arguments (parameters).
> Unfortunately, it seems like the HTTP Request object ignores query
> arguments unless the method is GET. Do I understand this correctly, and is
> this by design?
>
> David