in my application, I need to send the bearer token as authorization
before getting call
I tried this
RestAssured.given().auth().oauth2(token).when().get("/search").then().assertThat().statusCode(200);
in my application, I need to send the bearer token as authorization
before getting call
I tried this
RestAssured.given().auth().oauth2(token).when().get("/search").then().assertThat().statusCode(200);
This one should work
RestAssured.given().header("Authorization", "bearer " + token).when().get("/search").then().assertThat().statusCode(200);