java.lang.Object
net.serenitybdd.screenplay.rest.abilities.CallAnApi
All Implemented Interfaces:
Ability

public class CallAnApi extends Object implements Ability
A Screenplay ability that allows an actor to perform REST queries against a specified API. For example: ``` Actor sam = Actor.named("Sam the supervisor").whoCan(CallAnApi.at("https://reqres.in")); ```
  • Method Details

    • at

      public static CallAnApi at(String baseURL)
      Ability to Call and api at a specified baseUrl
    • as

      public static CallAnApi as(Actor actor)
      Used to access the Actor's ability to CallAnApi from within the Interaction classes, such as GET or PUT
    • resolve

      public String resolve(String resource)
    • getLastResponse

      public io.restassured.response.Response getLastResponse()
    • toString

      public String toString()
      Overrides:
      toString in class Object