Skip to content

Commit

Permalink
Add POST API
Browse files Browse the repository at this point in the history
  • Loading branch information
dilpreetj committed Aug 3, 2023
1 parent cc85c3a commit 3d7ca89
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/contact.api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ test.describe('Contact', () => {
const response = await fakerApi.get('users');
const responseBody = await response.json();
randomPerson = responseBody[0];

const postResponse = await fakerApi
.post('/users/1/todos', {
data: {
"title": "Learn Playwright",
"completed": "false"
}
});

const postResponseBody = await postResponse.json();
console.log(postResponseBody);
})


Expand Down

0 comments on commit 3d7ca89

Please sign in to comment.