Forum Discussion

Awake Kapoor's avatar
Awake Kapoor
Copper Contributor
Nov 28, 2016

How to call external web service in SharePoint Framework Client web part (Modern web part)

I want to consume one external web service in modern web part using Typescript (SharePoint framework), i am using this.context.httpclient.get but its not working, kindly help me on this

3 Replies

  • Is it a SOAP web service, REST-based, or?

    If the response is in JSON-format, you can use this: 

    https://visualstudiomagazine.com/articles/2013/10/01/calling-web-services-with-typescript.aspx

     

    • Awake Kapoor's avatar
      Awake Kapoor
      Copper Contributor
      Its REST based and providing response in JSON, but i dont know why $.getJSON is not working in my case, let me know if you have any other option
      • Anders Brunholm Sylvest's avatar
        Anders Brunholm Sylvest
        Brass Contributor

        You should check if the jQuery library is being loaded correctly. 

        Otherwise, paste the code trying to get the json-data here. :)