I would suggest that you google a bit about this (and please tell us your findings) and if you can't find anything you could write a "redirect filter" that extracts the location header and forwards the request to that URL.If the 301 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.
--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.
protected RequestSpecification specRedirect() {
RestAssuredConfig restAssuredConfig = RestAssuredConfig.config()
.redirect(redirectConfig().maxRedirects(1))
.objectMapperConfig(new ObjectMapperConfig().jackson2ObjectMapperFactory(
(aClass, s) -> new ObjectMapper().configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
));
RestAssured.useRelaxedHTTPSValidation();
restAssuredConfig = restAssuredConfig.httpClient(httpClientConfig().setParam(PARAMETER_NAME, TIMEOUT_VALUE));
RequestSpecification spec = new TestSpecificationImpl(
new RequestSpecBuilder()
.setConfig(restAssuredConfig)
.setBaseUri(this.baseURI)
.setBasePath(this.basePath)
.addFilters(this.filters)
.addHeaders(this.headers)
.build(),
new ResponseSpecBuilder()
.build()
).getRequestSpecification();
if (cookies != null && useCookies) {
spec.cookies(cookies);
}
return spec;
}
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.