简体   繁体   English

如何从URL读取JSON数据

[英]How to read JSON data from url

Snapped code returns data from url in JSON format, how to create function to read data returned by this code in JQuery ? 快照代码以JSON格式从url返回数据,如何在JQuery中创建函数以读取此代码返回的数据?

var RealDataApi = function () {
var url_getgatedata = "api/realdata/getgatedata";

return {
    getGateData: function (done, fail, always) {
        var jqxhr = $.get(url_getgatedata);
        jqXhrHandler(jqxhr, done, fail, always);
    },

You can take the headers or parameters in the URL and by using postman you can get the JSON. 您可以在URL中获取标头或参数,并使用邮差获得JSON。 Some of the headers will be encrypted in the URL. 某些标头将在URL中被加密。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM