Open this example in the interactive library
Source code
const headers = new Headers({ "Content-Type": "application/json" });
console.log(headers.get("content-type"));
Sample output
application/json

Create HTTP headers. A self-contained example using the JavaScript runtime.
Open this example in the interactive library
const headers = new Headers({ "Content-Type": "application/json" });
console.log(headers.get("content-type"));
application/json