0
votes

enter image description here

I'm using a POST request in jmeter as below,

POST https://aumaz-ap-perf-ess-web-2.aumaz-ase-dev002.p.azurewebsites.net/signalr/connect

POST data:
clientProtocol=1.5&connectionData=%5B%7B%22name%22%3A%22bulkprocesshub%22%7D%5D&connectionToken=DWGWhf7zGj9TyO4cZn2kqH%2Bennba0V7qyAuAE2wIeu3vIoj%2FrLXemcaBz%2Fto3JjEs%2BaVviiFagxtax8E9PbE36cnBAlrByzw5qBwmIu9glop75vPY3XI0me52yTDiWC%2B9Zoalg%3D%3D&processId=b47fe282-8112-4a11-a18c-7629ac31b816&transport=longPolling

Request Headers:
X-Requested-With: XMLHttpRequest
Accept: text/plain, */*; q=0.01
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Referer: https://aumaz-ap-perf-ess-web-2.aumaz-ase-dev002.p.azurewebsites.net/ESS/DataType
Connection: keep-alive
Connection: keep-alive
Host: aumaz-ap-perf-ess-web-2.aumaz-ase-dev002.p.azurewebsites.net
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Length: 315
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

If I use the same POST request in browser i can able to get the exact response. But in jmeter I'm getting the response as Bad request.

As of now, I'm using jmeter 3.01 and I have installed all the certificates needed. Can anyone please give solution for this

2
Please check that data you are sending in browser is same as data you are sending in POST request. It will be good if you elaborate your http requestPoorvaja Deshmukh
yes. I have copied this request from jmeter. and if i try this in browser its working. This application url will work only under my company proxy. I have checked the data and it is correct. i couldn't find any perfect help from any blogs regarding this Bad request. processId bed99fa8-c454-420a-a8cf-24d10b0226af connectionData [{"name":"bulkprocesshub"}] connectionToken m4mG4TcbGGOfxUBEqV8Nn0z0hRAXKzrasvoY6IRDyXeUia6+gXJFFs5bNF1ivWFWz+KLBg3tJWohv8ZgFgq97HgcG46zE+TmyNvlJ41QipSjWIxbCUIVd+hXJbvzXpDJt2KWTA== clientProtocol 1.5 transport longPollingRenu
Try adding Content-Type as application/jsonPoorvaja Deshmukh
Just tried not working, getting same Bad request. And using developer tool I have copied those headers.Renu
@PoorvajaDeshmukh Is there anything like jmeter will block some request kind of? Because I have extracted all dynamic values and the extractions are correct as I can able to view the perfect response if I gve the same request in browser.Renu

2 Answers

0
votes

The most problem here seems to be that server doesn't respond with any details of what's wrong with the request. Correct?

Then do two things:

1) Install Fiddler, capture what you're sending through browser, and through JMeter, compare.

That may give you a clue what's the difference.

2) Reach server logs and see what's going on, there may be way more intrinsic information on why request was considered invalid.

0
votes

I have finally got a solution. If I pass those parameters in parameters it doesn't work but i gave all the parameters with & in the path itself.

And used ${__urlencode{parameter}} to encode the parameters which are passing as encoded value and then I didn't face any Bad request issue.

Even now, I don't know how it worked. But finally got a solution by this way.