I'm working on a SharePoint 2013 on premises Hosted App. The app needs to get data from an external REST endpoint from a web service on another computer. I've managed to get in Javascript the SP.WebProxy.invoke working fine (code below); except it hits the 200 Kb limit sometimes depending on the length of the JSON data in the response. Is this is there an alternative way of doing this call in Javascript or perhaps Node.js? As I understand it with the SP.WebProxy approach there is no way of increasing the 200Kb limit of the returned buffer.
Some one recently mentioned using the Service Bus. The environment is installed on Windows Server 2012 and the Service bus is configured but I've no ides how to implement this in a SharePoint App can anyone point me to a resource to get going every search I try keeps bring back Azure Service bus not Window Service bus
$.ajax({
url: "../_api/SP.WebProxy.invoke",
type: "POST",
dataType: 'json',
data: JSON.stringify(
{
"requestInfo": {
"__metadata": { "type": "SP.WebRequestInfo" },
"Url": webServiceUrl,
"Method": "POST",
"Headers": {
"results": [{
"__metadata": { "type": "SP.KeyValue" },
"Key": "Accept",
"Value": "application/json;odata=verbose",
"ValueType": "Edm.String"
},
{
"__metadata": { "type": "SP.KeyValue" },
"Key": "Content-Type",
"Value": "application/json;odata=verbose",
"ValueType": "Edm.String"
}]
},
"Body": jsonData
}
}),
headers: {
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
},
success: function (data)
{
var jsonData = JSON.parse(data.d.Invoke.Body);
DisplayResults(jsonData);
},
error: function (jqXHR, textStatus, errorThrown)
{
alert("Failure " + errorThrown);
}
});
odata=verbose
from the external source? Usingodata=nometadata
orodata=minimalmetadata
to reduce the payload ?