What Content-Type HTTP header value is required when sending an HTTP POST request using JavaScript to ensure that PHP can access the data?
What Content-Type HTTP header value is required when sending an HTTP POST request using JavaScript to ensure that PHP can access the data?
To ensure that PHP can access the data being sent in an HTTP POST request using JavaScript, the Content-Type HTTP header should be set to 'application/x-www-form-urlencoded'. This is because PHP is designed to automatically parse data with this content type into the $_POST superglobal array, making it easy to access.
The correct answer is : A. application/x-www-form-urlencoded
I think answer should be A: application/x-www-form-urlencoded