jQuery 㧠Ajax å¦çãæ¸ãã¦ããã¨ããAPI éä¿¡ã®ä¸é¨ã®ãªã¯ã¨ã¹ãã ã JSON ãè¿ã£ã¦ããªããªãç¾è±¡ã«ãããã¾ããã jQuery.ajax() ã¯è¿ã£ã¦ããã¹ãã¼ã¿ã¹ã³ã¼ããè¦ã¦æå¦ããã§ãã¯ãã¦ãã¾ããã301 Moved Permanently ã 302 Found ã§ãæåããã¨ã¿ãªãã success ã®å¦çãèµ°ãããã§ãã jQuery.ajax({ url: '/api/', dataType: 'json', success: function(data) { // ã¹ãã¼ã¿ã¹ã³ã¼ãã 301 ã 302 ã§ãå®è¡ããã console.log('OK'); } }); ä»åããã£ãç®æã§ã¯ http ã®ãªã¯ã¨ã¹ãã https 㸠302 ã§ãªãã¤ã¬ã¯ããã¦ãã¾ãããçµæçã« success ã¾ã§ç¢ºå®ã«å¦çã¯èµ°ã£ã¦ãããã© API ã®çµæãè¿ã£ã¦ããªã
{{#tags}}- {{label}}
{{/tags}}