Skip to content

Instantly share code, notes, and snippets.

@justinehell
Created September 4, 2020 09:44
Show Gist options
  • Save justinehell/112ea6c7bae03c5dee458536d3a78bae to your computer and use it in GitHub Desktop.
Save justinehell/112ea6c7bae03c5dee458536d3a78bae to your computer and use it in GitHub Desktop.
Le protocole HTTP - Mise en pratique
### Request with Wilders URL
GET https://http-practice.herokuapp.com/wilders
### Request with 2 filters : Javascript & page 2
GET https://http-practice.herokuapp.com/wilders?language=JavaScript&page=2
### Request url-encoded
POST https://http-practice.herokuapp.com/wilders
Content-Type: application/x-www-form-urlencoded
name=John%20Doe&language=C%23
### Request JSON
POST https://http-practice.herokuapp.com/wilders
Content-Type: application/json
{
"name": "Jane Smith",
"language": "JavaScript"
}
### GET the added wilder with id for Jane
GET https://http-practice.herokuapp.com/wilders/2710
### PUT request to update wilder with id
PUT https://http-practice.herokuapp.com/wilders/2710
Content-Type: application/x-www-form-urlencoded
name=Jane%20Poe&language=JavaScript
### DELETE wilder with id
DELETE https://http-practice.herokuapp.com/wilders/2710
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment