2018-09-22 15:39:38
2018-09-22 15:39:38
  • Can't see the 4 bold characters, click on the image to refresh.
Click on the row of the table to view, update or activate the datasource.
NameContent-TypeNumber of callable timesUpdated onURL
  Why do you need a custom JSON/XML datasource?
  • When developing a program, you often need to access a URL to return json or xml, etc. At this point you can create a new datasource for testing.
  • To avoid being called maliciously, the default number of calls is 50, but when the number of times decreases, an activation can be performed to reset it to 50.

How to call the datasource?

  1. Click "Create datasource", input name, mime type and verification code, then click "Save or Activate" button。
  2. After that,Click on the list to copy its call URL(E.g: https://xyzkit.com/cds?id=5a5c2edb-be85-4d9a-8fc4-a373aa0f9d4a).
  3. Access the URL copied above in your program.

Activate datasource

  • Input datasource's UUID, click query button.
  • Click on the row of the table to view, then click "Save or Activate" button to update or activate the datasource.

Ajax cross-domain calling issues:

  • Update return text(JSON/XML/Text),Add callback function,E.g:callback();
    Update {"name": "Jack", "gender": "male"} to callback('{"name": "Jack", "gender": "male"}')
  • Configure as follows, url、dataType and jsonp 。
    $.ajax({
      url: "https://www.tiomg.org/cds?id=5a5c2edb-be85-4d9a-8fc4-a373aa0f9d4a",
      type: "POST",
      dataType: "jsonp",
      jsonp: "callback",
      jsonpCallback:"callback",
      success: function (data) {
        var result = JSON.stringify(data);
        $("#text").val(result);
      }
    });