The body of the response is a JSON text, encoded in UTF-8. If the text contains any JSON encoding errors, then the request fails. If the request succeeds, then the done function is called with the request number and the value obtained from the parsing of the JSON text. The proxy receives a POST request with the following parameters in the request body: contentType— The MIME type of the file.base64— The base-64 encoded file content.fileName—The file name, as requested by the caller. The proxy is expected to return the decoded file with the Content-Disposition header set to attachment; filename="<fileName.xslx>".
The encodeURIComponent() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).