Complete the code to set the raw body type to XML in Postman.
pm.request.body.mode = '[1]';
Setting pm.request.body.mode to raw tells Postman to use raw as the body type for XML content.
Complete the code to set the raw XML body content in Postman.
pm.request.body.raw = '[1]';
The raw body content must be a string containing valid XML. Option A is a valid XML string.
Fix the error in setting the Content-Type header for XML raw body in Postman.
pm.request.headers.upsert({ key: 'Content-Type', value: '[1]' });The correct Content-Type for XML raw body is application/xml.
Fill both blanks to correctly set raw XML body and Content-Type header in Postman.
pm.request.body.mode = '[1]'; pm.request.headers.upsert({ key: 'Content-Type', value: '[2]' });
Set the body mode to 'raw' and Content-Type header to 'application/xml' for XML raw body.
Fill all three blanks to create a Postman test that checks if the response Content-Type is XML.
pm.test('Response is XML', () => { pm.response.to.have.header('[1]'); pm.expect(pm.response.headers.get('[2]')).to.include('[3]'); });
The test checks that the response has a 'Content-Type' header and that its value includes 'application/xml'.