MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / headersToString

Function headersToString

javascript/selenium-webdriver/lib/http.js:73–79  ·  view source on GitHub ↗

* Converts a headers map to a HTTP header block string. * @param {!Map } headers The map to convert. * @return {string} The headers as a string.

(headers)

Source from the content-addressed store, hash-verified

71 * @return {string} The headers as a string.
72 */
73function headersToString(headers) {
74 const ret = []
75 headers.forEach(function (value, name) {
76 ret.push(`${name.toLowerCase()}: ${value}`)
77 })
78 return ret.join('\n')
79}
80
81/**
82 * Represents a HTTP request message. This class is a "partial" request and only

Callers 2

toStringMethod · 0.70
toStringMethod · 0.70

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected