Performs HTTP GET with gzip compression support.
This way of enabling compression is deprecated, please use http client setup to achieve the same result. See HttpCompressionViaSetup.
script | http test | |
enable compression | ||
get from | http://fakerestapi.azurewebsites.net/api/activities/1 | |
show | response | {"ID":1,"Title":"Activity 1","DueDate":"2020-03-16T09:31:15.6199626+00:00","Completed":false} |
Note that the Content-Encoding header is automatically removed after the content is decoded, so |show|response header|Content-Encoding| will show null regardless of actual encoding. Tools like Wireshark will allow you to see if the content was really sent gzipped.
Also note that 'enable compression' lasts for the rest of the test run, or until you call 'disable compression'.
Included page: .HsacExamples.SlimTests.HttpTests.CustomHttpConfig.TearDown (edit)
Since changing HTTP client setting last for the entire run we ensure http test's HTTP client is set back to default after each test.
The original default setting is saved in the SuiteSetUp of this suite.
The original default setting is saved in the SuiteSetUp of this suite.
script | http client setup |
configure http test with | $originalClient |