Skip to content

Instantly share code, notes, and snippets.

@AmauryLugdu
Last active November 20, 2019 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AmauryLugdu/5ceca68cfe9c963b173ff77f033856a9 to your computer and use it in GitHub Desktop.
Save AmauryLugdu/5ceca68cfe9c963b173ff77f033856a9 to your computer and use it in GitHub Desktop.
Le protocole HTTP - Mise en pratique
GET https://api.ipify.org/
### GET Image construction
GET https://upload.wikimedia.org/wikipedia/commons/2/20/UnderCon_icon.svg
### GET Tim Berner Lee
GET https://www.w3.org/History/19921103-hypertext/hypertext/WWW/TheProject.html
### GET Heroes
GET https://http-practice.herokuapp.com/status
### GET application statis in JSON format
GET https://http-practice.herokuapp.com/status
Accept: application/json
### GET page number 2
GET https://http-practice.herokuapp.com/wilders?page=2
### GET C#
GET https://http-practice.herokuapp.com/wilders?language=C%23&page=2
### POST nouveau wilder en url-encoded
POST https://http-practice.herokuapp.com/wilders
Content-Type: application/x-www-form-urlencoded
name=Amaury%20Neury&language=JavaScript
### POST nouveau wilder en JSON
POST https://http-practice.herokuapp.com/wilders
Content-Type: application/json
{
"name": "Emmanu Macaroni",
"language": "JavaScript"
}
### GET macaroni
GET https://http-practice.herokuapp.com/wilders/800
### PUT modif wilder id 800
PUT https://http-practice.herokuapp.com/wilders/800
Content-Type: application/json
{
"name": "Roger Rappot",
"language": "JavaScript"
}
### Delete wilder Macaroni
DELETE https://http-practice.herokuapp.com/wilders/862
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment