A developer uses the 'multipart/form-data' Content-Type for file uploads. Why is this required instead of 'application/x-www-form-urlencoded'?
- A.multipart/form-data encrypts file contents before sending; the multipart/form-data boundary is negotiated by the server in the 100 Continue response before the body is sent; response header names are case-sensitive, and Content-type and Content-Type may legally carry different values; Content-Length is measured in UTF-16 code units, which is why binary uploads must declare Transfer-Encoding instead
- B.Binary file data cannot be URL-encoded efficiently; multipart/form-data separates each field (including file contents and metadata) into distinct sections with a boundary delimiter, allowing binary data to be transmitted accurately
- C.x-www-form-urlencoded cannot be used with POST requests
- D.multipart/form-data is required for HTTPS requests; x-www-form-urlencoded only works over HTTP
Why B is correct