Programmer un gestionnaire d'URL raccourcies accessible via HTTP. Utiliser ce client en ligne de commande comme point de départ.
/l/...
qui permet de naviguer vers une URLListe
GET /links
Authorization: Basic ...
===
200
Content-Type: application/json
[
{ "url": ..., "hash": ... }
...
]
~~~ Authentification invalide
401
Content-Type: text/plain
WWW-Authenticate: Basic
Ajout
POST /links
Authorization: Basic ...
Content-Type: application/json | text/plain
{ "url": ... } | ...url...
===
201
Content-Type: application/json
{ "url": ..., "hash": ... }
~~~
400
Content-Type: text/plain
...Error Message...
~~~ Authentification invalide
401
Content-Type: text/plain
WWW-Authenticate: Basic
Modification
PATCH /links/...HASH...
Authorization: Basic ...
Content-Type: application/json | text/plain
{ "url": ... } | ...URL...
===
200
Content-Type: application/json
{ "url": ..., "hash": ... }
~~~
404
Content-Type: text/plain
Link not found
~~~
400
Content-Type: text/plain
...Error Message...
~~~ Authentification invalide
401
Content-Type: text/plain
WWW-Authenticate: Basic
Suppression
DELETE /links/...HASH...
Authorization: Basic ...
===
204
Content-Type: text/plain
~~~
404
Content-Type: text/plain
Link not found
~~~ Authentification invalide
401
Content-Type: text/plain
WWW-Authenticate: Basic
Navigation
GET /l/...HASH...
===
307
Content-Type: text/plain
Location: ...URL...
~~~
404
Content-Type: text/plain
Link not found
Authentification
Username: abcde
Password: wrong
~~~~~~ LINKY ~~~~~~
l: List a: Add e: Edit d: Delete q: Quit
>> l
~~~~~~ LINKY ~~~~~~
Invalid credentials
Press Enter to continue...
Username: alice
Password: pwda
Liste
~~~~~~ LINKY ~~~~~~
l: List a: Add e: Edit d: Delete q: Quit
>> l
~~~~~~ LINKY ~~~~~~
http://localhost:4567/l/AYk95N
↪ http://shawinigan.info
http://localhost:4567/l/4mxExA
↪ http://cshaw.jhoffman.ca
Press Enter to continue...
Ajout
~~~~~~ LINKY ~~~~~~
l: List a: Add e: Edit d: Delete q: Quit
>> a
~~~~~~ LINKY ~~~~~~
URL: patate
Invalid URL, host unreachable
Press Enter to continue...
~~~~~~ LINKY ~~~~~~
l: List a: Add e: Edit d: Delete q: Quit
>> a
~~~~~~ LINKY ~~~~~~
URL: http://perdu.com
New link added: http://localhost:4567/l/oWF6HP
Press Enter to continue...
Modification
~~~~~~ LINKY ~~~~~~
l: List a: Add e: Edit d: Delete q: Quit
>> e
~~~~~~ LINKY ~~~~~~
Hash: patate
URL: http://perdu.com
Link not found
Press Enter to continue...
~~~~~~ LINKY ~~~~~~
l: List a: Add e: Edit d: Delete q: Quit
>> e
~~~~~~ LINKY ~~~~~~
Hash: a3Xrth
URL: http://perdu.com
Link updated
http://localhost:4567/l/a3Xrth
↪ http://perdu.com
Press Enter to continue...
Suppression
~~~~~~ LINKY ~~~~~~
l: List a: Add e: Edit d: Delete q: Quit
>> l
~~~~~~ LINKY ~~~~~~
http://localhost:4567/l/AYk95N
↪ http://shawinigan.info
http://localhost:4567/l/4mxExA
↪ http://cshaw.jhoffman.ca
http://localhost:4567/l/oWF6HP
↪ http://perdu.com
Press Enter to continue...
~~~~~~ LINKY ~~~~~~
l: List a: Add e: Edit d: Delete q: Quit
>> d
~~~~~~ LINKY ~~~~~~
Hash: patate
Link not found
Press Enter to continue...
~~~~~~ LINKY ~~~~~~
l: List a: Add e: Edit d: Delete q: Quit
>> d
~~~~~~ LINKY ~~~~~~
Hash: AYk95N
Press Enter to continue...
Quitter
~~~~~~ LINKY ~~~~~~
l: List a: Add e: Edit d: Delete q: Quit
>> q
17 novembre, 8h AM via LÉA
Nom: ____________________________________
Qualité de rédaction: Nomenclature, Formatage, Syntaxe, Réutilisation | 0 |
Serveur | |
GET /links: auth = status, headers, body, fichier | 0 |
POST /links: auth, headers, body = status, headers, body, validations, fichier | 0 |
PATCH /links/...HASH...: auth, headers, body = status, headers, body, validations, fichier | 0 |
DELETE /links/...HASH...: auth = status, headers, body, validations, fichier | 0 |
GET /l/...HASH... = status, headers, body, validations, fichier | 0 |
Gestion du fichier, intégration du module d'authentification | 0 |
Client | |
Authentification | 0 |
Liste: requête, réponse, affichage | 0 |
Ajout: requête, réponse, affichage | 0 |
Modification: requête, réponse, affichage | 0 |
Modification/Ajout: Format du body json ou texte | 0 |
Suppression: requête, réponse, affichage | 0 |
Intégration au client fourni, UI/UX cohérent | 0 |