Search code examples
rest-assured

Is there a difference between request().get(url) and request().request(Method.GET,url)


I want to know if there is any difference between request().get(url) and request().request(Method.GET,url) in RestAssured.

When I try to do get() both seem to working same.


Solution

  • No, functionally they are the same, it's a matter of style. Both call the private method

    applyPathParamsAndSendRequest(String method, String path, Object... unnamedPathParams)
    

    You can choose one to match your code style.