{"id":3257,"date":"2025-01-16T04:24:55","date_gmt":"2025-01-16T04:24:55","guid":{"rendered":"https:\/\/rahulshettyacademy.com\/blog\/?p=3257"},"modified":"2025-01-16T04:26:47","modified_gmt":"2025-01-16T04:26:47","slug":"sample","status":"publish","type":"post","link":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/2025\/01\/16\/sample\/","title":{"rendered":"sample"},"content":{"rendered":"<p><em>In this blog we will learn about POST Request (API Testing) using Playwright Java.<\/em><\/p>\n<p><strong>Topics that we will cover:<\/strong><\/p>\n<ul>\n<li>Create a Post Request using playwright<\/li>\n<li>Learn how to parse json<\/li>\n<li>Sample Post Request (Register successful, 200)<\/li>\n<li>Sample Post Request (Login unsuccessful, 400)<\/li>\n<li>Source code (Post a new user and parse json)<\/li>\n<li>Source code (register successful)<\/li>\n<li>Source code (login unsuccessful)<\/li>\n<\/ul>\n<p><strong>Create a Post Request using playwright<\/strong><\/p>\n<p>In this section, we will explore the process of making an API request using Playwright through the POST method.<\/p>\n<p>Go to <a href=\"https:\/\/reqres.in\/\" target=\"_blank\" rel=\"noopener\">https:\/\/reqres.in\/<\/a>&nbsp;<\/p>\n<p>Please note that for the POST request, it is necessary to provide a body as part of the request, see below&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog we will learn about POST Request (API Testing) using Playwright Java. Topics that we will cover: Create a Post Request using playwright Learn how to parse json Sample Post Request (Register successful, 200) Sample Post Request (Login unsuccessful, 400) Source code (Post a new user and parse json) Source code (register successful) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":750,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3257","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","post-wrapper","thrv_wrapper"],"_links":{"self":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/3257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=3257"}],"version-history":[{"count":4,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/3257\/revisions"}],"predecessor-version":[{"id":3261,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/3257\/revisions\/3261"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/media\/750"}],"wp:attachment":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=3257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=3257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=3257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}