SharePoint 2013 앱에서 원격 서비스에서 JSON 데이터를 가져 오는 방법은 무엇입니까?

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/52695

문제

SharePoint 호스팅이며 JQuery.ajax 호출을 사용하여 원격 웹 서비스에서 데이터를 얻을 수없는 SharePoint 2013 용 App에서 작업하고 있습니다.Microsoft에서 문서화 된 원격 데이터를 얻는 유일한 두 가지 방법은 다음과 같습니다. 웹 프록시 호출 또는 사용자 정의 프록시 페이지 .

이 방법을 사용할 수있는 유일한 것들이거나 다른 것이 있거나 다른 것이 있습니까?나는 jquery.ajax 전화와 비슷한 것을 찾고 있습니다.

도움이 되었습니까?

해결책

Here is a method to accomplish this: from the JavaScript page code use the jQuery.ajax function with the argument "dataType" set to "jsonp" and call the web service that supports jsonp requests and that returns a json result back.

You can find more details about a .NET specific implementation of a web service and the call code here: Rick Strahl - Creating a JSONP Formatter for ASP.NET Web API. You can get data from any web service that supports jsonp calls: it can be a node.js or a rails service.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top