Will the request headers be overwritten? #766
|
Hi, When I have a ky instance where the "Content-Type" header is, by default, set to "application/json", will it automatically update the same header to "multipart/form-data" when I send formData in a request with the same instance? I have read the docs but that use case was not so clear to me. Kind regards |
Answered by
sindresorhus
Oct 15, 2025
Replies: 1 comment 3 replies
|
Yes, when you send FormData in a request, Ky automatically removes any default |
3 replies
Answer selected by
sindresorhus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, when you send FormData in a request, Ky automatically removes any default
Content-Typeheader (including your instance'sapplication/json), allowing the browser to set the correctmultipart/form-dataheader with the proper boundary.