Complete the code to set the form-data key in Postman.
pm.request.body.formdata.add({ key: '[1]', value: 'test' });The key 'username' is commonly used in form-data to identify the user field.
Complete the code to check if the form-data body contains a key.
const hasKey = pm.request.body.formdata.has('[1]');
Checking for 'username' key is common when validating form-data content.
Fix the error in the code to correctly set a form-data value.
pm.request.body.formdata.get('[1]').value = 'newValue';
Using 'username' ensures the correct form-data key is updated.
Fill both blanks to add a new form-data key and value.
pm.request.body.formdata.add({ key: '[1]', value: '[2]' });The key 'apiKey' with value 'abcdef' is a common pair in form-data for authentication.
Fill all three blanks to update a form-data key's value and check its existence.
if (pm.request.body.formdata.has('[1]')) { pm.request.body.formdata.get('[2]').value = '[3]'; }
This code checks if 'sessionId' exists, then updates its value to 'xyz789'.
