AnsweredAssumed Answered

Capture HTTP MetaData in {{VARIABLE}} for use in JDBC Step

Question asked by Jeff_Tucker__BofA on Nov 9, 2018
Latest reply on Nov 9, 2018 by Jeff_Tucker__BofA

I am trying to capture some of the HTTP meta data (e.g. HTTP-URI) from an incoming request and then use that data as part of a query in the JDBC step.  I have a Scriptable DPH that gets the Request from the testExec.getStateObject("lisa.vse.request") and then sets a String variable (named "URI") using  request.getMetaData().get("HTTP-URI").  Then I am using testExec.setStateValue("URI", URI).   


In the JDBC step parameters, I am trying to use that value with this reference:   {{URI}}    but the actual literal value is being passed, not the value I was attempting to pull from the request.  Can you post the Beanshell code to do this?  I am not permitted to post my code here, but I can say what I am using looks exactly like what is in the examples I have found.  It just is not getting the value from the request.