Getting ExceptionCaused by: org.apache.http.client.CircularRedirectException: Circular redirect to "url name/some value"

417 views
Skip to first unread message

Saurabh Garg

unread,
Aug 21, 2018, 7:23:09 AM8/21/18
to REST assured
public void getSession(){
Response resp =RestAssured.given().when().get(URL);
System.out.println(resp.asString());
}

I tried in below ways
1. given().
        redirects().allowCircular(true).when().get(URL)

2. //	 RestAssuredConfig cfg = RestAssuredConfig.newConfig().httpClient(HttpClientConfig.httpClientConfig().setParam("http.protocol.allow-circular-redirects", false));
then passing this cfg to config method but still facing same issue

But still same issue.

Saurabh Garg

unread,
Aug 23, 2018, 12:55:22 AM8/23/18
to rest-a...@googlegroups.com
@johan: Any idea on the same?. As I am still struggling with this.
Thanks,
Saurabh



--
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/d/optout.

Johan Haleby

unread,
Aug 27, 2018, 2:48:09 AM8/27/18
to rest-a...@googlegroups.com
Have you tried the redirect dsl?
given().redirects().allowCircular(false). ..
Regards,
/Johan

Johan Haleby

unread,
Aug 27, 2018, 2:49:27 AM8/27/18
to rest-a...@googlegroups.com
Sorry that should be allowCircular(true), but I also saw that you've already tried it. Is the API public then perhaps I can give it a try?

Regards,
/Johan
Reply all
Reply to author
Forward
0 new messages