Hi,
Using SmartClient_v90p_2014-01-24_Pro (Google Chrome), I'm having an issue with DSRequest.downloadResult and POST data.
We want to fetch server to generate an excel file. We have to use a POST because we need to include a picture in the excel which is generated from a SVG that we give in the request payload.
So I use the following code
The problem is that the payload is wrapped in a transaction when I put downloadResult to true.
The payload I catch with Fiddler is something like the following (after some transformation to be easier to read)
In the backend I'm waiting for a String which contains the SVG I have to work with, but I get an empty params.
When downloadResult is false the payload contains only the data and my param is valued so I can use it.
Any idea to get a payload which contains only the SVG we want to send and don't data wrapped in a transaction?
Thanks for your help
Using SmartClient_v90p_2014-01-24_Pro (Google Chrome), I'm having an issue with DSRequest.downloadResult and POST data.
We want to fetch server to generate an excel file. We have to use a POST because we need to include a picture in the excel which is generated from a SVG that we give in the request payload.
So I use the following code
Code:
var svg = 'SVG to send'; RPCManager.sendRequest({ actionURL : url, httpMethod : 'POST', contentType : 'text/html', exportDisplay : 'window', downloadResult : true, downloadToNewWindow : true, httpHeaders : { 'Accept' : 'application/vnd.ms-excel' }, showPrompt : false, data : svg });
The payload I catch with Fiddler is something like the following (after some transformation to be easier to read)
Code:
_transaction= <transaction+xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"+xsi:type="xsd:Object"> <transactionNum+xsi:type="xsd:long">29</transactionNum> <operations+xsi:type="xsd:List"> <elem>My SVG</elem> </operations> <jscallback>if+%28%21%28new+RegExp%28"%5E%28%5C%5Cd%7B1%2C3%7D%5C%5C.%29%7B3%7D%5C%5Cd%7B1%2C3%7D%24"%29.test%28document.domain%29%29%29+%7Bwhile+%28%21window.isc+&&+document.domain.indexOf%28"."%29+%21=+-1+%29+%7B+try+%7B+parent.isc;+break;%7D+catch+%28e%29+%7Bdocument.domain+=+document.domain.replace%28/.*%3F%5C./%2C+""%29;%7D%7D%7Dparent.isc.Comm.hiddenFrameReply%2829%2Cresults%29</jscallback> </transaction> &protocolVersion=1.0&__iframeTarget__=request_1399900588089
When downloadResult is false the payload contains only the data and my param is valued so I can use it.
Any idea to get a payload which contains only the SVG we want to send and don't data wrapped in a transaction?
Thanks for your help
Comment