Multiple choice technology programming languages

What request header must be set for parameter data to be decoded from a form?

  1. EncType: application/x-www-urlencoded

  2. Content-Type: application/x-www-form-urlencoded

  3. Content-Type: multipart/form-data

  4. Encoding-Type: multipart/form-data

  5. Accept-Encoding: application/www-form-encoded

  6. Encoding-Type: multipart/www-form-data Request

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The 'Content-Type: application/x-www-form-urlencoded' header tells the server how to decode the parameter data from an HTML form submission. This is the standard encoding for form data where key-value pairs are URL-encoded (special characters converted to %XX format). The servlet container uses this header to properly parse the request body and populate the HttpServletRequest's parameter methods. Note the header name is 'Content-Type', not 'EncType' or 'Encoding-Type'.