Service Virtualization

Expand all | Collapse all

Create property from http request header

Jump to Best Answer
  • 1.  Create property from http request header

    Posted 05-17-2017 09:22 AM

    Hi,

    my test is composed by some http requests and i need to create a property containing a "request" header value (not "response" header) that i need to use some steps after. The header is automatically created after a redirect.

    How can i create a filter that catches the value of an Header in the request? I just see filters that work on the response.

     

    Thanks in advance.

    Domenico



  • 2.  Re: Create property from http request header

    Posted 05-17-2017 03:03 PM

    It is the property that you mention in top of filter to extract the value, provide property that contains request instead of response.  



  • 3.  Re: Create property from http request header

    Posted 05-17-2017 04:08 PM

    Thank you Monika.

    Which one of the following should i use? They seem to work all on .rsp.

     



  • 4.  Re: Create property from http request header

    Posted 05-17-2017 05:22 PM

    As discussed, in your scenario we might need to script for that.



  • 5.  Re: Create property from http request header

    Broadcom Employee
    Posted 05-17-2017 05:34 PM

    Run the test in the ITR.  Look at the properties tab.  You should see the  request header  in lis.StepName.http.headers properties.  

     

    hope this helps.  



  • 6.  Re: Create property from http request header

    Posted 05-18-2017 08:11 AM

    Domenico,

     

    Did Monika's and Shiney's recommendation help you out with this issue?



  • 7.  Re: Create property from http request header

    Posted 05-18-2017 06:11 PM

    I am still working on it.

    The scenario is really complex to reproduce becouse of some automatic redirect called; at the moment i'm trying using scripting.

     

    Thanks.

     

    Domenico



  • 8.  Re: Create property from http request header
    Best Answer

    Broadcom Employee
    Posted 05-22-2017 11:29 AM

    If the request is an XML, then you can use the XML XPath filter. If it is not XML, you can use "Create properties based on surrounding values" filter.

     

    If you still need help, please open a support ticket.