Forum Discussion

tsrinathreddy's avatar
tsrinathreddy
New Contributor
10 years ago

How to Parse HTTP Response Header and transfer to property

I am obtaining the following response to a HTTP Request in SOAP UI TTP/1.1 201 CreatedX-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=blockCache-Control: no-cache, no-store, max-age=0, mus...
  • rupert_anderson's avatar
    10 years ago

    Hi,

     

    Is this what you wanted?

     

    def str = '/api/authorization_servers/5362c2c46362f0e7f33379e8'
    log.info str.split("/")[-1]

     

    Gives:

     

    • Mon Jul 13 19:54:08 BST 2015:INFO:5362c2c46362f0e7f33379e8

     

    Let me know,

     

    Cheers,

    Rup