Curl (Linux): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „{{note|Noch in Bearbeitung}} == Links == [https://curl.haxx.se/docs/manpage.html https://curl.haxx.se/docs/manpage.html] Zurück zu Ubuntu#C (Client)|Ub…“) |
|||
(4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
== Installation == | |||
<pre> | |||
sudo apt-get install -y curl | |||
</pre> | |||
== Verwendung == | |||
=== Upload einer Multipart-Datei === | |||
<pre> | |||
curl -X POST \ | |||
-H "Content-Type: multipart/form-data" \ | |||
-H "Cookie: JSESSIONID=A745FE67D2D13D24526261CBBA6883FB; XSRF-TOKEN=36af42c6-7988-4ccb-a11d-6bb9ebdd3b69" \ | |||
-F "file=@/mnt/c/Users/Martin/Downloads/Test.xlsx" \ | |||
http://localhost:8080/import-test/rest/importer/excel?_csrf=36af42c6-7988-4ccb-a11d-6bb9ebdd3b69 | |||
</pre> | |||
=== Senden eines DELETE-Calls === | |||
<pre> | |||
curl -X DELETE \ | |||
-H "Cookie: XSRF-TOKEN=4774ac4b-a992-40e1-969c-61576997348c; JSESSIONID=9CF84EE9A98185A2926303F9B6AA2593" \ | |||
http://localhost:8080/delete-test/rest/delete?id=1&_csrf=4774ac4b-a992-40e1-969c-61576997348c | |||
</pre> | |||
== Links == | == Links == |
Aktuelle Version vom 18. Dezember 2020, 16:55 Uhr
Installation
sudo apt-get install -y curl
Verwendung
Upload einer Multipart-Datei
curl -X POST \ -H "Content-Type: multipart/form-data" \ -H "Cookie: JSESSIONID=A745FE67D2D13D24526261CBBA6883FB; XSRF-TOKEN=36af42c6-7988-4ccb-a11d-6bb9ebdd3b69" \ -F "file=@/mnt/c/Users/Martin/Downloads/Test.xlsx" \ http://localhost:8080/import-test/rest/importer/excel?_csrf=36af42c6-7988-4ccb-a11d-6bb9ebdd3b69
Senden eines DELETE-Calls
curl -X DELETE \ -H "Cookie: XSRF-TOKEN=4774ac4b-a992-40e1-969c-61576997348c; JSESSIONID=9CF84EE9A98185A2926303F9B6AA2593" \ http://localhost:8080/delete-test/rest/delete?id=1&_csrf=4774ac4b-a992-40e1-969c-61576997348c
Links
https://curl.haxx.se/docs/manpage.html
Zurück zu Ubuntu