Imagine that someone is assessing our restful-booker-platform API sandbox to determine whether it’s an application that they would like to use for a B&B. As they begin to explore it, they discover that the room API needs to be called to create a room that can be booked. As they look through the API documentation, they come across details similar to the ones shown in figure 4.1.
Based on this information, we build and send the following HTTP request to see how the API responds:
POST /room/ HTTP/1.1 Host: automationintesting.online Accept: application/json Cookie: token=r76BXGVy8rlASuZB { "roomNumber":100, "type":"Single", "accessible":false, "description":"Please enter a description for this room", "image":"https://www.mwtestconsultancy.co.uk/img/room1.jpg", "roomPrice":"100", "features":["WiFi"] }