Hi use POST , not PUT. The response tab is what your application responds with (Im assuming you have it as Show Text). If it isnt giving you what you expect , then possibly we are not sending the data to it correctly(assuming the app works correctly). if you have access to the app logs then this is easy to figure out , if not then you need to compare with any working request
regards deepak On Mon, Jun 14, 2010 at 2:28 PM, Phan, Van <[email protected]> wrote: > Thank you Deepak. > Yes, I have to change it to PUT to get 200 success code back. > However, the response in View Result Tree, is empty. > How could I the actual response in RESPONSE tab? > Thanks a lot for your help. > > Van > > -----Original Message----- > From: Deepak Shetty [mailto:[email protected]] > Sent: Monday, June 14, 2010 2:00 PM > To: JMeter Users List > Subject: Re: Problem w/ json in https request > > 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">{"cid":"lsakdjflsa", > >> "pst":"lskajdflsa", > >> > "context":{"country":"default","language":"default","view":"default","container":"default"},"gadgets":[{"gid":"1111","moduleId":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 > >> > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >

