I am trying to passe Binary image data by REST API & Sever code Service
png & gif is passing good
only problem with jpeg
why is this occurring?
414 Request-URI Too Large
Hello Amirul,
Please clarify, how do you send that value? Through a POST body parameter? Please send it there.
Yes as POST.small content is passing but large
I am splitting the data and passing
How may I do this sync
I notice stored data is random
function chunkString(str, len) {
var _size = Math.ceil(str.length/len),
ret = new Array(size),
_offset
;
for (var _i=0; _i,VideoData);
restservice_adpost_video.execute({});
}
*/
}
Can you say how may i catch this Body data to Server code?
Look the data variable
I think this is not actual way
let me know how to set
var url = "http://hadaj.com/_scripts/rest-api/se...";
var responseBody = {};
var requestParams = {};
var paramKeys = request.keys()
for (var key = 0; key < paramKeys.length; key++) {
requestParams[paramKeys[key]] = request.get(paramKeys[key]);
}
//var ad_id = requestParams['ad_id'];
//var image = requestParams['image'];
data = requestParams['data'];
var XHRResponse = XHR2.send("GET", url, {
"parameters": {
},
"headers": {
"header1": "value1",
"header2": "value2",
},
"body": data
}
);
Apperyio.response.success(XHRResponse.body, "application/json");
You can read a request body parameter with a method request.body():
https://docs.appery.io/reference#serv...