Sometimes test needs to test that API respond with correct redirect status code and correct redirect Location header.
This means that in testing it is not always needed to automatically follow http redirect responses.
Add configuration option to rest-client level configuration
so that when an endpoint responds with redirects like 301 response or other 3XX response statuses the rest-client treats it as a completed response instead of following redirects.
The extra optional configuration parameter at the rest-client object will be:
follow-redirects: boolean (default true if parameter not specified)
If set to false the rest-client should be created with a configuration option to not follow redirects.
If set to true or not specified then use option/feature of rest-client to follow redirects.
Make sure that this will work with GraalVM
Update README file.
Update schema for test suite yaml file
In cmdrest website create documentation page "handling http redirects" and include documentation for this configuration. Make sure the emphasize that this configuration option is available only at rest-client object, not on individual test. Add a suggestion that if only certain specific tests need the option to NOT follow redirects, while other tests do need to follow redirects then you should create a second rest-client that will share the same basic configuration as the other rest-client with the only different in adding follow-redirects: false added to second rest-client. Then indicate the value of rest-client to use the second rest-client in tests that need to not follow redirects.
Sometimes test needs to test that API respond with correct redirect status code and correct redirect Location header.
This means that in testing it is not always needed to automatically follow http redirect responses.
Add configuration option to rest-client level configuration
so that when an endpoint responds with redirects like 301 response or other 3XX response statuses the rest-client treats it as a completed response instead of following redirects.
The extra optional configuration parameter at the rest-client object will be:
follow-redirects: boolean (default true if parameter not specified)
If set to false the rest-client should be created with a configuration option to not follow redirects.
If set to true or not specified then use option/feature of rest-client to follow redirects.
Make sure that this will work with GraalVM
Update README file.
Update schema for test suite yaml file
In cmdrest website create documentation page "handling http redirects" and include documentation for this configuration. Make sure the emphasize that this configuration option is available only at rest-client object, not on individual test. Add a suggestion that if only certain specific tests need the option to NOT follow redirects, while other tests do need to follow redirects then you should create a second rest-client that will share the same basic configuration as the other rest-client with the only different in adding follow-redirects: false added to second rest-client. Then indicate the value of rest-client to use the second rest-client in tests that need to not follow redirects.