外部サーバー呼び出し(makeRequest)

「外部サーバー呼び出し(makeRequest)」の編集履歴(バックアップ)一覧に戻る
外部サーバー呼び出し(makeRequest)」を以下のとおり復元します。
*使用できるデータタイプ

dataType を使って指定

text, html, xml, json, jsonp, script, feed, data のいずれかを指定。 

*JQury.ajax を使う場合

  $.ajax({
    type: 'post',
    url: 'http://example.com/data.json',
    data: { comment: 'Say Hello!' },
    dataType: 'json',
    success: function(data, status) {
      console.log(data, status);
    },
    error: function(xhr, status, e) {
      console.info(xhr, status, e);
    }
  });

*jQuery.post を使う場合

  $.post('http://example.com/data.json', { comment: 'Say Hello!' },
    function(data, status) {}, 'json');

復元してよろしいですか?