UNPKG

e2ed

Version:

E2E testing framework over Playwright

12 lines (11 loc) 425 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getContentJsonHeaders = void 0; /** * Get `Content-Length` and `Content-Type` headers for JSON body. */ const getContentJsonHeaders = (bodyAsString) => ({ 'content-length': String(Buffer.byteLength(bodyAsString ?? '')), 'content-type': 'application/json; charset=UTF-8', }); exports.getContentJsonHeaders = getContentJsonHeaders;