Forum Discussion

richie's avatar
richie
Community Hero
6 years ago
Solved

Parameterize Assertion HTTP Header Values in Script Assertion?

Hey!   Ok - I queried the forum to find posts about asserting the values on HTTP headers using script assertions and found yet more code nmrao had put together to assert on custom header values ...
  • nmrao's avatar
    6 years ago
    richie,
    What does below shows if you add at the start of the script?

    def ns = context.expand('${REST Request#namespace}')
    def ds = context.expand('${REST Request#dataset}')
    def value = "attachment; ${ns}_${ds}.csv" as String
    log.info value