The Internets


This is the gist of it


GET AND POST

  • GET is used to get data from a server resource
    • GET submits via the query string
  • POST is used to submit data to a server resource
    • POST is sent via HTTP message body

AJAX

Asynchronous javascript and XML

  • Make requests to the server in the background
  • Allows you to send and receive data from the server without refreshing the page

How

  • XMLHttpRequest Object
  • jQuery - $.ajax
  • jQuery - $.get
  • jQuery - $.post

$.get('/myapi', function(dataFromServer){
 console.log(dataFromServer);}); 

Common Response Formats

  • JSON - JavaScript Object Notation
{  "slide" : {   "type" : "all",   "title" : "Overview",   "items" : [     "item1",     "item2"   ]  }}
  • XML - Extensible Markup Language
<slide type="all">
   <title>Overview</title>
   <item>item1</item>
   <item>item2</item>
</slide>
 

The Internets

By Matt Null

The Internets

  • 1,324