Just to confirm
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Request

For the POST and PUT method, if there is no file to send, and the name(s) of
the parameter(s) are omitted, then the body is created by concatenating all
the value(s) of the parameters. ...

For other methods, if the name of the parameter is missing, then the
parameter is ignored.

So if you have an empty name , the Method cant be GET

regards
deepak



On Mon, Jun 14, 2010 at 1:46 PM, Deepak Shetty <[email protected]> wrote:

> Hi
> I believe you have to use POST (or PUT) (if you wish to specify empty
> parameter name in JMeter). If you want to use GET , youll have to directly
> specify this in URL.
>
> regards
> deepak
>
>
> On Mon, Jun 14, 2010 at 1:08 PM, Phan, Van <[email protected]> wrote:
>
>> Hi,
>> Please help. Thanks in advance.
>> I want to send a https request w/ json format, and parse json response.
>> I set up a Thread Group that has HTTP Request Default.
>> I have HTTP Request which has (json request in parameter value, parameter
>> name is blank,  and HTTP Header
>> has "Content-Type=application/json", and View result tree listener  to get
>>  response.  I got the request sent out as no Jason attached. Looking at
>> Exact JSON should be in param.value:
>>
>> {"cid":"lsakdjflsa", "pst":"lskajdflsa",
>> "context":{"country":"default","language":"default","view":"default","container":"default"},"gadgets":[{"gid":"1111","moduleId":1}]}
>>
>> View Result Tree shows the request has this only ...
>>
>> >>>>GET https://localhost:22108/gadgets/metadata
>>
>> [no cookies]
>>
>> Request Headers:
>> Connection: keep-alive
>> Content-Type: application/json
>> >>>>>>
>>
>> Below is sampler, RED is highlight the Jason as Param Value.
>>
>>  Sample of HTTPSampler:
>>
>>       <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler"
>> testname="/gadgets/metadata" enabled="true">
>>          <elementProp name="HTTPsampler.Arguments" elementType="Arguments"
>> guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
>>            <collectionProp name="Arguments.arguments">
>>              <elementProp name="" elementType="HTTPArgument">
>>                <boolProp name="HTTPArgument.always_encode">true</boolProp>
>>                <stringProp
>> name="Argument.value">{&quot;cid&quot;:&quot;lsakdjflsa&quot;,
>> &quot;pst&quot;:&quot;lskajdflsa&quot;,
>> &quot;context&quot;:{&quot;country&quot;:&quot;default&quot;,&quot;language&quot;:&quot;default&quot;,&quot;view&quot;:&quot;default&quot;,&quot;container&quot;:&quot;default&quot;},&quot;gadgets&quot;:[{&quot;gid&quot;:&quot;1111&quot;,&quot;moduleId&quot;:1}]}</stringProp>
>>                <stringProp name="Argument.metadata">=</stringProp>
>>                <boolProp name="HTTPArgument.use_equals">true</boolProp>
>>              </elementProp>
>>            </collectionProp>
>>          </elementProp>
>>          <stringProp name="HTTPSampler.domain">localhost</stringProp>
>>          <stringProp name="HTTPSampler.port">22108</stringProp>
>>          <stringProp name="HTTPSampler.protocol">https</stringProp>
>>          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
>>          <stringProp
>> name="HTTPSampler.path">/gadgets/metadata</stringProp>
>>          <stringProp name="HTTPSampler.method">GET</stringProp>
>>          <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
>>          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
>>          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
>>          <boolProp name="HTTPSampler.DO_MULTIPART_POST">true</boolProp>
>>          <stringProp name="HTTPSampler.mimetype"></stringProp>
>>          <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
>>          <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
>>          <stringProp name="HTTPSampler.monitor">false</stringProp>
>>          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
>>        </HTTPSampler>
>>        <hashTree/>
>>
>> Thanks a lot.
>> Van
>>
>
>

Reply via email to