Vollständiges Paket mit lokaler Referenz und allen veröffentlichten Modi installieren.
install curlcurlNutzen Sie
curl <url|host|me> [options]curl meden aktuellen Host verwenden
curl example.comeine GET-Anfrage senden und Status sowie Inhalt anzeigen
curl example.com -Inur die finalen Antwort-Header anzeigen
curl example.com -s [file]die Antwort speichern; bei fehlendem Namen den URL-Dateinamen verwenden
curl example.com -X POST -d "a=1"einen Anfragekörper senden
-X <method>die HTTP-Methode festlegen
-d <data>den Anfragekörper festlegen; Standard ist POST
-H "Name: value"einen Anfrage-Header hinzufügen; kann wiederholt werden
-u <user>HTTP-Basic-Authentifizierung mit verborgener Passworteingabe verwenden
-c '{"name":"value"}'Cookies aus einem JSON-Objekt senden
-s [file] | -o <file>die Antwort auf dem Host speichern
-aanhängen statt ersetzen; erfordert -s oder -o
-iendgültige Antwort-Header einbeziehen
-Inur endgültige Antwort-Header anzeigen
-jAntwort als strukturiertes JSON anzeigen
-edit @editAntworttext im Texteditor öffnen
-code @codeAntworttext im Code-Editor öffnen
-t [seconds]5 Sekunden oder ein benutzerdefiniertes Zeitlimit von 1 bis 300 verwenden
-Tein Zeitlimit von 300 Sekunden verwenden
-4 | -6IPv4 oder IPv6 verwenden, wenn
-rWeiterleitungen nicht folgen
-kein unsicheres TLS-Zertifikat zulassen
Beginnen Sie mit
-u <user> fragt das Passwort getrennt ab. In -d und Cookies eingegebene Geheimnisse können jedoch in der Befehlshistorie stehen. TLS-Prüfung und bis zu fünf Weiterleitungen sind Standard; -k deaktiviert die Zertifikatsprüfung, -r die Weiterleitung. Ohne PHP -4/-6 benötigen
Führen Sie die vorbereiteten Beispiele direkt auf der Seite aus. Die Ergebnisse sind vorab erstellt und werden im Browser angezeigt; auf dem Server wird kein Terminalbefehl ausgeführt.
Installieren Sie die aktuelle kompatible Version. Wählen Sie Base für den vollständigen Funktionsumfang oder Minimum für das reduzierte Paket; ein bereits installiertes Modul wird mit upgrade aktualisiert.
Base und Minimum sind zwei Pakete derselben aktuellen Modulversion.
Vollständiges Paket mit lokaler Referenz und allen veröffentlichten Modi installieren.
install curlDas reduzierte Paket installieren. Die lokale Referenz entfällt;
install curl -mGenau diese veröffentlichte Version installieren.
install curl -v 1.2.5upgrade prüft Kompatibilität und ersetzt den Block nur bei Bedarf.
upgrade curlErweiterungsblock entfernen, Core und andere Module bleiben erhalten.
install curl -uDie Beispiele sind kopierbar, werden aber nicht von der Website ausgeführt. Prüfen Sie Pfade, Rechte und destruktive Optionen.
curl https://example.comNetzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
<!doctype html>
<html>…</html>curl meNetzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
<!doctype html>
<html>…</html>curl https://example.com -INetzwerk-Lernbeispiel — keine Live-Anfrage
HTTP/2 200
content-type: text/html; charset=UTF-8
cache-control: max-age=86000curl https://example.com -iNetzwerk-Lernbeispiel — keine Live-Anfrage
HTTP/2 200
content-type: text/html; charset=UTF-8
<!doctype html>
<html>…</html>curl https://example.com -jNetzwerk-Lernbeispiel — keine Live-Anfrage
{
"status": 200,
"url": "https://example.com/",
"headers": [
"HTTP/2 200",
"content-type: text/html; charset=UTF-8"
],
"body": "<html>…</html>"
}curl https://example.com -X POST -d "name=lil"Netzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Example response to a POST request; the server may reject POST or return another status.curl https://example.com -d "name=lil"Netzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Example response to a POST request; the server may reject POST or return another status.curl https://example.com -H "Accept: application/json"Netzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Request contains custom headers; the remote reply depends on the endpoint.curl https://example.com -H "Accept: application/json" -H "X-Demo: 1"Netzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Request contains custom headers; the remote reply depends on the endpoint.curl https://example.com -c '{"theme":"dark"}'Netzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Request includes Cookie: theme=dark; the server decides how to respond.curl https://example.com -u demoNetzwerk-Lernbeispiel — keine Live-Anfrage
A separate secret-password prompt appears before the request is sent.curl https://example.com -sNetzwerk-Lernbeispiel — keine Live-Anfrage
sandbox/
index.html
The response body is saved on the hosting account.curl https://example.com -s tmp/example.htmlNetzwerk-Lernbeispiel — keine Live-Anfrage
sandbox/tmp/
example.html
The response body is saved on the hosting account.curl https://example.com -o tmp/example.htmlNetzwerk-Lernbeispiel — keine Live-Anfrage
sandbox/tmp/
example.html
The response body is saved on the hosting account.curl https://example.com -o tmp/example.html -aNetzwerk-Lernbeispiel — keine Live-Anfrage
sandbox/tmp/
example.html
The body is appended to the existing file.curl https://example.com -tNetzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Timeout option changes the maximum wait, not the response format.curl https://example.com -t 2Netzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Timeout option changes the maximum wait, not the response format.curl https://example.com -TNetzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Timeout option changes the maximum wait, not the response format.curl https://example.com -4Netzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Requested IP family IPv4 (requires PHP cURL).curl https://example.com -6Netzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Requested IP family IPv6 (requires PHP cURL).curl https://example.com -rNetzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Redirect following disabled; response status depends on endpoint.curl https://example.com -kNetzwerk-Lernbeispiel — keine Live-Anfrage
HTTP: 200
URL: https://example.com/
Certificate verification disabled for this diagnostic request.curl https://example.com -editNetzwerk-Lernbeispiel — keine Live-Anfrage
The installed text editor opens the response in a protected temporary file.curl https://example.com -codeNetzwerk-Lernbeispiel — keine Live-Anfrage
The installed code editor opens the response in a protected temporary file.curl https://example.com -j -codeNetzwerk-Lernbeispiel — keine Live-Anfrage
The installed code editor opens the response in a protected temporary file as formatted JSON.curl https://example.com -edit -s tmp/example.htmlNetzwerk-Lernbeispiel — keine Live-Anfrage
Editor mode cannot be combined with -s or -ocurl https://example.com -aNetzwerk-Lernbeispiel — keine Live-Anfrage
Append requires an output filecurl ftp://example.comNetzwerk-Lernbeispiel — keine Live-Anfrage
Invalid URLcurl https://example.com -4 -6Netzwerk-Lernbeispiel — keine Live-Anfrage
Choose either IPv4 or IPv6curl https://example.com -X 9badNetzwerk-Lernbeispiel — keine Live-Anfrage
Invalid HTTP methodcurl https://example.com -H "broken"Netzwerk-Lernbeispiel — keine Live-Anfrage
Invalid headercurl https://example.com -c not-jsonNetzwerk-Lernbeispiel — keine Live-Anfrage
Invalid cookie JSONcurl https://example.com -t 301Netzwerk-Lernbeispiel — keine Live-Anfrage
Invalid timeoutcurl https://example.com -oNetzwerk-Lernbeispiel — keine Live-Anfrage
Output file requiredcurl https://example.com -edit -codeNetzwerk-Lernbeispiel — keine Live-Anfrage
Choose one editor