Skip to content
On this page

Empower Your Test Results with AI-Powered Insights ->

removeDefaultExpectHeaders

Removes all default expect headers. Helps in removing/clearing all default expect headers.

Syntax

js
removeDefaultExpectHeaders();

Usage

โœ… Correct Usage

js
response.removeDefaultExpectHeaders();

Examples

Normal

js
const { spec, response } = require('pactum');

response.removeDefaultExpectHeaders();

await spec()
  .get('https://randomuser.me/api')
  .expectStatus(200);

See Also

Released under the MIT License.