Complete the code to create a new Postman collection named "My API".
pm.collection.create({ name: "[1]" });The collection name should be "My API" as specified.
Complete the code to add a request named "Get Users" to the collection.
pm.collection.items.add({ name: "[1]", request: { url: "https://api.example.com/users", method: "GET" } });The request name should be exactly "Get Users" to match the instruction.
Fix the error in the code to set the request method to POST.
pm.collection.items.add({ name: "Create User", request: { url: "https://api.example.com/users", method: "[1]" } });The method should be "POST" to create a new user.
Fill both blanks to add a folder named "User Operations" and add a request named "Delete User" inside it.
const folder = pm.collection.items.add({ name: "[1]", item: [] });
folder.items.add({ name: "[2]", request: { url: "https://api.example.com/users/123", method: "DELETE" } });The folder name is "User Operations" and the request name is "Delete User" as specified.
Fill the blanks to create a request with a JSON body and add it to the collection.
pm.collection.items.add({ name: "[1]", request: { url: "https://api.example.com/users", method: "POST", header: [{ key: "Content-Type", value: "[2]" }], body: { mode: "raw", raw: JSON.stringify({ name: "John" }) } } });The request name is "Create User", the Content-Type header should be "application/json" for JSON data, and the body mode is "raw" with JSON stringified data.