Remix
Remix
remix/headers · FunctionView Source

stringify

Summary

Converts a Headers object to a raw HTTP header string.

Signature

function stringify(headers: Headers): string;

Example

let headers = new Headers({
  "Content-Type": "text/html",
  "Cache-Control": "no-cache",
});
stringify(headers); // 'Content-Type: text/html\r\nCache-Control: no-cache'

Parameters

headers

A Headers object to stringify

Returns

A raw HTTP header string with headers separated by CRLF (\r\n)