Get REQuest API with jQuery

    0

    0

    The get() method of the jQuery plugin fetches the JSON data from the specified URL. The data argument is a JavaScript object, and the status argument is a boolean indicating whether the request succeeded or not. The xhr argument is a jQuery AJAX call object.

    // JQUERY
    jQuery.get(
      "https://jsonplaceholder.typicode.com/posts",
      (data, status, xhr) => {
        console.log(data, status, xhr)
      }
    )
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.