0

Basically i want to call API in js file .In system.xml file i have declared a field in which i have enter the API URL .I want to call API in Ajax hit.how can i do that? any suggestions?

closed as off-topic by Jai, Shoaib Munir, Sumit, Dhiren Vasoya, Muhammad Hasham Nov 7 at 5:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about third-party modules are generally off-topic because the scope of functionality and code are not available. For more information, see this meta post/answer." – Jai, Shoaib Munir, Sumit, Dhiren Vasoya, Muhammad Hasham
If this question can be reworded to fit the rules in the help center, please edit the question.

0

Maybe this is your problem

You can use JQuery in javascript for call API

 var payload = {};

 function successCallback(res) {};

 $widget.xhr = $.ajax({
      url: 'http://jundat95.com/test',
      cache: true,
      type: 'GET',
      dataType: 'json',
      data: payload,
      success: successCallback
 }).done(function () {
      $widget._XhrKiller();
 });

Not the answer you're looking for? Browse other questions tagged or ask your own question.