Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4782

How to pass authorization token in header in Rest assured?

$
0
0

Trying to automate api testing using Rest assured

@Testpublic void Login() {    Response resp = given().            body("{\"phone_number\":\"2222222222\",\"\r\n"+"+ \" \"country_code\": \"+91\",\"\r\n"+"+ \" \"login_type\": 0}").            when().            contentType(ContentType.JSON).            post("http://url/api/v1/login");    System.out.println(resp.asString());}

Viewing all articles
Browse latest Browse all 4782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>