Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
2
stevekrouse avatar

When would someone use this function? Those headers are provided by default, so what would be the point?

neverstew avatar

They would use it to both check what the default is and then override the default headers if they want to. I see it as a very succinct summary of the whole discord thread in that it: a) documents the default, b) teaches new people how to change that default and c) allows them to do it instantly inside Val Town

Updated: November 9, 2024