title: Rest Assured - body() in given() or when()
body: <p>What differences putting .body() in given() or when()?
  I tried both and they works the same.</p>
  
  <p>The documentation on rest-assured git page says .body() is inserted in given(), and I tried searching for any article on putting .body() in when(), but found nothing. I asked because the team I'm working with is using body() in when().</p>
  
  <p>Code Example:  </p>
  
  <pre><code>// #1  
  given().headers("Content-Type", "application/json").body(classBody).
  when().post(urlAPI).
  then().contentType(ContentType.JSON).extract().response()
  
  // #2
  given().headers("Content-Type", "application/json").
  when().body(classBody).post(urlAPI).
  then().contentType(ContentType.JSON).extract().response()
  </code></pre>
  
  <p>Both codes return the same result.
  So, which one is better?</p>