{"id":389,"date":"2026-06-23T21:29:43","date_gmt":"2026-06-23T21:29:43","guid":{"rendered":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/?p=389"},"modified":"2026-06-23T21:29:43","modified_gmt":"2026-06-23T21:29:43","slug":"so-verwenden-sie-curl-zum-senden-von-post-anfragen","status":"publish","type":"post","link":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/de\/2026\/06\/23\/so-verwenden-sie-curl-zum-senden-von-post-anfragen\/","title":{"rendered":"So verwenden Sie cURL zum Senden von POST-Anfragen"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Wenn Sie als Entwickler mit APIs arbeiten, ist es Pflicht, zu lernen, wie man mit cURL POST-Anfragen sendet. Es ist eine der einfachsten M?glichkeiten, Endpunkte zu testen, Daten hochzuladen oder mit Servern zu interagieren &#8211; alles direkt aus dem Terminal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In diesem Beitrag zeigen wir Ihnen, wie Sie mit cURL POST-Anfragen senden und wie Sie JSON, XML, Dateien sowie Formulardaten ?bertragen.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Schritt 1: Ist cURL installiert?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Auf den meisten Systemen ist cURL bereits installiert. Um zu pr?fen, ob das bei Ihnen der Fall ist, ?ffnen Sie ein Terminal und f?hren Sie den folgenden Befehl aus:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl --version<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If it\u2019s not installed, download it from&nbsp;<a class=\"\" href=\"https:\/\/curl.se\/\">curl.se<\/a>. Windows users may need Git Bash or WSL to get the best results.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Schritt 2: Eine einfache POST-Anfrage<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Hier ist ein grundlegendes Beispiel f?r eine POST-Anfrage mit cURL:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -X POST -d \"Hello\" https:\/\/example.com\/api<br><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-X POST<\/code>&nbsp;= HTTP-Methode<\/li>\n\n\n\n<li><code>-d<\/code>&nbsp;= Daten, die Sie im Body senden<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Schritt 3: Content-Type-Header hinzuf?gen<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Damit der Server wei?, welche Art von Daten Sie senden, sollten Sie einen&nbsp;<code>Content-Type<\/code>&nbsp;Header angeben:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">F?r Klartext:<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -X POST -H \"Content-Type: text\/plain\" -d \"Hello\" https:\/\/example.com\/api<br><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">F?r JSON:<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -X POST -H \"Content-Type: application\/json\" \\<br>  -d '{\"name\":\"Alice\",\"age\":30}' https:\/\/example.com\/api<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Verwenden Sie einfache Anf?hrungszeichen um JSON, damit Ihr Terminal nicht durch innere doppelte Anf?hrungszeichen verwirrt wird.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Schritt 4: XML-Payloads senden<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Wenn die API XML erwartet:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -X POST -H \"Content-Type: application\/xml\" \\<br>  -d '&lt;?xml version=\"1.0\"?&gt;&lt;user&gt;&lt;name&gt;Alice&lt;\/name&gt;&lt;\/user&gt;' \\<br>  https:\/\/example.com\/api<br><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Schritt 5: Dateien mit&nbsp;<code>-F<\/code>&nbsp;hochladen<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Zum Hochladen von Dateien (z. B. Bilder, Dokumente oder Logs):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -X POST -F \"file=@\/path\/to\/file.jpg\" https:\/\/example.com\/upload<br><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Mehrere Dateien hochladen:<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -X POST \\<br>  -F \"image1=@\/path\/to\/one.jpg\" \\<br>  -F \"image2=@\/path\/to\/two.jpg\" \\<br>  https:\/\/example.com\/upload<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">cURL verarbeitet&nbsp;<code>multipart\/form-data<\/code>&nbsp;automatisch f?r Sie.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Schritt 6: Formulardaten senden<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">F?r klassische Formular?bermittlungen (wie Login oder Kontaktformular):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -X POST -d \"username=test&amp;password=1234\" https:\/\/example.com\/login<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Sie k?nnen auch mehrere Formularfelder mit wiederholten&nbsp;<code>-d<\/code>&nbsp;Flags ?bergeben oder sie in einem String zusammenfassen.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Schritt 7: Basic Authentication hinzuf?gen<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Wenn der Endpunkt Anmeldedaten erfordert, verwenden Sie&nbsp;<code>-u<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -u username:password https:\/\/example.com\/secure<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Dadurch wird automatisch ein&nbsp;<code>Authorisation<\/code>&nbsp;Header mit Base64-Kodierung hinzugef?gt.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">cURL mit Residential Proxies verwenden<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Wenn Sie geo-targeted Endpunkte testen oder zus?tzliche Privatsph?re m?chten, k?nnen Sie cURL mit einem Proxy wie folgt verwenden:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -x http:\/\/proxyuser:proxypass@gw.thunderproxy.net:5959 \\<br>  -X POST -d '{\"action\":\"test\"}' https:\/\/example.com\/api<br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">At\u00a0<a href=\"https:\/\/thunderproxy.com\/\" class=\"\">Thunderproxy.com<\/a>, we provide <a href=\"https:\/\/www.thunderproxy.com\/de\/products\/proxies\/residential-proxies\/\">residential proxies<\/a> that work perfect with cURL. This is helpful when testing websites from different locations or when you need to bypass rate limits.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Fazit<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">cURL is a tool for developers, system administrators and testers. It\u2019s fast and efficient &#8211; whether you are sending JSON, uploading files, or logging into protected endpoints.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you learn the basic flags (<code>-X<\/code>,&nbsp;<code>-d<\/code>,&nbsp;<code>-H<\/code>,&nbsp;<code>-F<\/code>,&nbsp;<code>-u<\/code>), you\u2019ll be comfortable to create any kind of HTTP request in seconds.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wenn Sie mit APIs arbeiten, ist es wichtig zu wissen, wie man mit cURL POST-Anfragen sendet. Lernen Sie, JSON, XML, Formulardaten und Dateien zu senden.<\/p>\n","protected":false},"author":1,"featured_media":79,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"meta_title":"","meta_description":"","plan_title":"","referenced_products":[],"footnotes":""},"categories":[28],"tags":[53],"class_list":["post-389","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized-de","tag-tutorials"],"tag_slugs":["tutorials"],"meta_title":"","meta_description":"","referenced_products":[],"plan_title":"","headings":[{"level":2,"text":"Schritt 1: Ist cURL installiert?","id":"schritt-1-ist-curl-installiert","slug":"schritt-1-ist-curl-installiert"},{"level":2,"text":"Schritt 2: Eine einfache POST-Anfrage","id":"schritt-2-eine-einfache-post-anfrage","slug":"schritt-2-eine-einfache-post-anfrage"},{"level":2,"text":"Schritt 3: Content-Type-Header hinzuf?gen","id":"schritt-3-content-type-header-hinzufgen","slug":"schritt-3-content-type-header-hinzufgen"},{"level":3,"text":"F?r Klartext:","id":"fr-klartext","slug":"fr-klartext"},{"level":3,"text":"F?r JSON:","id":"fr-json","slug":"fr-json"},{"level":2,"text":"Schritt 4: XML-Payloads senden","id":"schritt-4-xml-payloads-senden","slug":"schritt-4-xml-payloads-senden"},{"level":2,"text":"Schritt 5: Dateien mit&nbsp;-F&nbsp;hochladen","id":"schritt-5-dateien-mit-f-hochladen","slug":"schritt-5-dateien-mit-f-hochladen"},{"level":3,"text":"Mehrere Dateien hochladen:","id":"mehrere-dateien-hochladen","slug":"mehrere-dateien-hochladen"},{"level":2,"text":"Schritt 6: Formulardaten senden","id":"schritt-6-formulardaten-senden","slug":"schritt-6-formulardaten-senden"},{"level":2,"text":"Schritt 7: Basic Authentication hinzuf?gen","id":"schritt-7-basic-authentication-hinzufgen","slug":"schritt-7-basic-authentication-hinzufgen"},{"level":2,"text":"cURL mit Residential Proxies verwenden","id":"curl-mit-residential-proxies-verwenden","slug":"curl-mit-residential-proxies-verwenden"},{"level":2,"text":"Fazit","id":"fazit","slug":"fazit"}],"lang":"de","translations":{"de":389,"ru":387,"en":74,"tr":388,"es":390},"pll_sync_post":[],"featured_media_src_url":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/wp-content\/uploads\/2025\/07\/pexels-fotios-photos-16129724-1024x768.jpg","_links":{"self":[{"href":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/wp-json\/wp\/v2\/posts\/389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/wp-json\/wp\/v2\/comments?post=389"}],"version-history":[{"count":1,"href":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/wp-json\/wp\/v2\/posts\/389\/revisions"}],"predecessor-version":[{"id":400,"href":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/wp-json\/wp\/v2\/posts\/389\/revisions\/400"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/wp-json\/wp\/v2\/media\/79"}],"wp:attachment":[{"href":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/wp-json\/wp\/v2\/media?parent=389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/wp-json\/wp\/v2\/categories?post=389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress-foccwcs4gooocs44ogwkggo0.thunderproxy.com\/index.php\/wp-json\/wp\/v2\/tags?post=389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}