iangfox1965
15 years agoOccasional Contributor
Using Groovy to set a HTTP header value
Hi,
I have several test cases in a test suite. Each test case consists of at least one Groovy test step followed by a REST test step for which I need to manually set a http header value.
I am using Test Suite Properties to store the values that I want to insert into a header.
What I want to know is the Groovy code I need to create a custom Header field and value in my REST test step please. A nice simple example would help me considerably.
Many thanks
Ian
I have several test cases in a test suite. Each test case consists of at least one Groovy test step followed by a REST test step for which I need to manually set a http header value.
I am using Test Suite Properties to store the values that I want to insert into a header.
What I want to know is the Groovy code I need to create a custom Header field and value in my REST test step please. A nice simple example would help me considerably.
Many thanks
Ian