curl https://www.mine.com/user
--key <pathToFile>/mine.rsa
--cert<pathToFile>/mine.pem
--cacert<pathToFile>/mine.trust.crt
--cookie SESSION
--cookie XSRF-TOKEN
--cookie-jar mine.cookies
--location
-H 'Accept:text/html, */*'
I'm want to configure the cookie, cookie-jar and location but I'm not sure I am doing it right.
Any help would be appreciated. Thanks
Here is my code
RestAssured.config = RestAssured.config().sslConfig(
sslConfig().with()
.truststore("truststore", "changeit")
.truststoreType("PKCS12")
.keystore("mine.p12", "changeit")
.keystoreType("PKCS12"));
Response response = given()
.cookie("SESSION")
.cookie("XSRF-TOKEN")
.accept(ContentType.HTML)
.when()
.get("https://www.mine.com/user")
.then()
.extract()
.response();