On 11 August 2012 00:03, Deepak Shetty <[email protected]> wrote: >> If not, is this the correct user agent and test tool behavior to expect > when coming across a 302 redirect for POST requests? > Yes a redirect is always a GET
AIUI if a POST is redirected, the client is supposed to prompt the user to get agreement that the redirect is OK. Only GET requests can be automatically redirected. You'll need to change the test plan to use the redirect URL instead. > regards > deepak > > On Fri, Aug 10, 2012 at 3:56 PM, David Luu <[email protected]> wrote: > >> Hi, >> >> This is first time I've come across this topic. By the way, I'm testing >> APIs that are under development so things might change, will follow up on >> them later but assuming correct server setup: >> >> I make POST to a URL and it returned 302 moved temporarily with new URL. >> The redirect is basically changing original URL of HTTP to HTTPS, that's >> it. In JMeter, I'm using an HTTP sampler and by default have the follow >> redirect option checked. It did follow the redirect but POST request became >> a GET and thus all POST data was lost and API call failed. I didn't specify >> a specific HTTP client to use, using system default. If it matters, which >> HTTP client is best suited for this? I was wondering whether under this >> situation JMeter can follow redirect but keep as POST request with same >> posted data? If so, how? If not, is this the correct user agent and test >> tool behavior to expect when coming across a 302 redirect for POST >> requests? >> >> Regards, >> David >> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
