0

I am new to rest assured, I want to perform some get and post for test data generation using rest assured. But I am unable to get the LTPA token and pass them to post. This works with postman but I want to do it through java. Any help

final String uri = "https://XXXX/Rest/XXXXX?user=XXXXX&pass=XXXX";
    final Response response = RestAssured.given().relaxedHTTPSValidation().accept(ContentType.JSON).get(uri);
    System.out.println(response.prettyPrint());
    Map<String, String> allCookies = response.cookies();
    System.out.println(allCookies);

Output {JSESSIONID=XXXXXXX:-1}

but i do not see the LTPA2 token

arul k
  • 1

1 Answers1

0

Your LTPA2 token must be in Response headers.

You can get the response headers by

response.headers ();

In case if LTPA token is also not available in headers then share the screenshot of postman so I can help you out.

Wasiq Bhamla
  • 949
  • 1
  • 7
  • 12