html form content type application json
Basically it appears that the html spec has different content types for html and form data. Json only has a single content type. According to the spec, a POST of json data should have the content-type: application/json. I am not sure where exactly the Body->Raw represent in HTML form? Please advise. Thank in advance.type: "POST", data: JSON.stringify(data), contentType: application /x-www-form-urlencoded Basically it appears that the html spec has different content types for html and form data. Json only has a single content type.How can I set the content the as applicaiton/json in jsp ? I have tried the following code, < page language"java" contentType"application/json charsetUTF-8" The JSON encoding also supports file uploads. The values of files are themselves structured as objects and contain a type field indicating the MIME type, a name field containing the file name, and a body field with the files content as base64.