Skip to content
Snippets Groups Projects
Commit f003ec26 authored by fabiovandewaeter's avatar fabiovandewaeter
Browse files

readme

parent db09246c
No related branches found
No related tags found
No related merge requests found
......@@ -51,9 +51,9 @@ mvn test
```shell
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer valid-token-1" -d '{"alias":"mon-ftp","host":"localhost","port":2121}' http://localhost:8080/ftps
curl -H "Authorization: Bearer valid-token-1" http://localhost:8080/ftps -v
curl -H "Authorization: Bearer valid-token-1" http://localhost:8080/ftps
curl -H "Authorization: Bearer valid-token-1" -o fichier.html http://localhost:8080/ftps/mon-ftp/test/download -v
curl -H "Authorization: Bearer valid-token-1" -o fichier.html http://localhost:8080/ftps/mon-ftp/test/download
```
## Détails du code
......@@ -79,7 +79,7 @@ Puis ouvrir le fichier `target/site/apidocs/index.html`
**Note comprise entre 10 et 11 si le code compile et peut être lancé pour afficher l'arborescence d'un serveur FTP via le proxy FlopBox:**
```shell
curl -X GET -v -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: anonymous" -H "X-FTP-Pass: anonymous" localhost:8080/ftps/mon-ftp/folder
curl -X GET -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: anonymous" -H "X-FTP-Pass: anonymous" localhost:8080/ftps/mon-ftp/folder
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 127.0.0.1:8080...
......@@ -103,6 +103,16 @@ Note: Unnecessary use of -X or --request, GET is already inferred.
**Note comprise entre 11 et 12 si—en plus—le proxy FlopBox, permet de télécharger (download) et téléverser (upload) un petit fichier texte:**
- download :
```shell
curl -X GET -H "Authorization: Bearer valid-token-1" http://localhost:8080/ftps/mon-ftp/test
```
- upload :
```shell
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer valid-token-1" -d '{"alias":"mon-ftp","host":"localhost","port":2121}' http://localhost:8080/ftps
```
**Note comprise entre 12 et 13 si—en plus—le proxy FlopBox, permet de télécharger (download) et téléverser (upload) un gros fichier binaire (image, vidéo, etc.):**
**Note comprise entre 13 et 14 si—en plus—le proxy FlopBox permet de gérer plusieurs serveurs FTP différents (ajout, suppression, modification des serveurs):**
......@@ -114,7 +124,7 @@ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer valid
- suppression :
```shell
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer valid-token-1" http://localhost:8080/ftps/mon-ftp
curl -X DELETE -H "Authorization: Bearer valid-token-1" http://localhost:8080/ftps/mon-ftp
```
- modification :
......@@ -124,7 +134,7 @@ curl -X PUT http://localhost:8080/ftps/mon-ftp -H "Content-Type: application/jso
- lister les serveurs :
```shell
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer valid-token-1" http://localhost:8080/ftps
curl -X GET -H "Authorization: Bearer valid-token-1" http://localhost:8080/ftps
[{"alias":"mon-ftp","host":"nouvelle-adresse","port":2221}]
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment