1fetch('https://jsonplaceholder.typicode.com/todos/1')
2 .then(response => response.json())
3 .then(json => console.log(json))
1Request Payload has
2ENDPOINT (Specific URL where we send our requests to a certain web service. )
3METHOD (Get•Post•Put•Patch•Delete)
4HEADERS(Represents the metadata of request
5or response. Like basically we can verify
6the object type we are sending etc )
7PARAMETERS(Parameters are to specifiying
8even more about the request we are sending
9like what specific resources needs to be returned etc.)
10BODY(Body is where we sent or received the request we made)
11For the repsonse
12Basically we are checking response body
13to verify if request matches with response.
14In the response we are verifying
15(body, status code, header, response time,
16 test structure of json against the given jsonSchema)
17
18