On 23 May 2014 11:31, <[email protected]> wrote: > Hi, > > I would like to log responses for non-200 HTTP status codes. > > In the Beanshell post-processor I have the code: > > if (prev.getResponseCode() != 200) { > print(prev.getResponseMessage()); > } > > But this is not going to work, because 'prev' is global and the state > can mutate within the conditional.
Are you sure it does not work? Have you tried it? > Could you tell me what the best approach would be to log non-200 > response messages or errors? I would probably use a Listener, but I don't immediately see why the Post-Processor approach should not also work. > Thanks > > Paul > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
