request.mimeType()
Returns the MIME type (content type) of a POST request. Returns null for a GET request.
This examples shows a script prints the MIME type of a POST request. The request body is in JSON format.
{
"email":"[email protected]",
"title": "Engineer",
"location": "Barcelona"
}
console.log(request.mimeType());
application/json