README -> API Index -> Modules Index -> lib.dom.form -> makeHeader
Source Module: src/lib/dom/form/index.js
Source Location: src/lib/dom/form/submit.js:154
makeHeader(opts = {})Build request headers for form submit workflows.
opts.method: request method (defaultPOST).opts.headers: caller headers merged over defaults.opts.contentType: explicit content type hint.opts.body: optional body used for type inference.
- Always starts with
Accept: application/json. - If
contentTypeis missing andbodyexists:FormData-> multipart/form-datastring-> application/x-www-form-urlencoded- other objects -> application/json
- Adds
Content-Typeonly when body exists, method is not GET, and body is notFormData.
Plain header object.
- Module page -> ../../modules/DOM_FORM.md
submit-> ./submit.md- API index -> ../../INDEX.md