Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Just a dummy AJAX endpoint for the HTML5 course.
Ruby JavaScript CSS
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
bin
config
db
lib
log
public
vendor/assets
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

HTML5 Apps with jQuery: AJAX Endpoint.

JSON resourceful API endpoint for the HTML5 class. There is one resource: a sighting.

Routes

  • GET /sightings.json for a JSON array of all sightings.
  • POST /sightings.json with Content-Type: application/json to create a sighting:
{
  "sighting": {
    "kind": "Unicorn",
    "date": "2013-02-20",
    "location": "Candy Mountain",
    "witnesses": 2,
    "name": "Charlie"
  }
}
  • GET /sightings/:id.json to get a JSON representation of the sighting with :id.
  • PUT /sightings/:id.json to update an existing sighting of :id (same content type and data as POST).
  • DELETE /sightings/:id.json to destroy sighting with :id.
Something went wrong with that request. Please try again.