Bir curl komutunu eşdeğer JavaScript fetch koduna dönüştürün, tamamen tarayıcınızda.
cURL fetch nasıl kullanılır
Bir curl komutu yapıştırın.
Eşdeğer fetch kodu anında oluşturulur.
JavaScript'i projenize kopyalayın.
A converter that turns a curl command into equivalent JavaScript fetch code, parsing the method, URL, headers and body so you get a ready-to-use request instead of translating it by hand.
It is a common need: API docs and tools like browser devtools give you a curl command, but your app is written in JavaScript. This bridges the two so you can paste curl and get fetch.
It runs locally in your browser, so your command, including any tokens or credentials in the headers, never leaves your device.
It understands the common flags: -X for the method, -H for headers, -d and its variants for the body, -u for basic auth, plus -A for the user agent and -b for cookies. A data flag implies POST, matching how curl behaves.
Multi-line commands work as-is. Backslash line continuations are joined automatically, so you can paste a command exactly as it appears in documentation without cleaning it up first.
The output is a fetch call with the method, headers and body filled in, which you can drop into your code and await like any other fetch.
Sıkça sorulan sorular
Yaygın olanlar: metot için -X, başlıklar için -H, gövde için -d ve varyantları, temel kimlik doğrulama için -u, artı -A ve -b. Veri bayrağı POST anlamına gelir.
Hayır. Dönüştürme tamamen tarayıcınızda çalışır, bu nedenle komutunuz ve içindeki tokenlar asla cihazınızdan ayrılmaz.
Evet. Ters eğik çizgi satır devamları otomatik olarak birleştirilir, bu nedenle bir komutu belgelerde göründüğü gibi yapıştırabilirsiniz.
Bu aracı göm
Bu aracı kendi web sitenize ekleyin. Aşağıdaki kod parçacığını kopyalayın; otomatik olarak güncel kalır.
<iframe src="https://monu.tools/embed/tr/curl-to-fetch" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>İlgili araçlar
JSON'ı TOML'a ve TOML'ı JSON'a dönüştürün, her iki yönde de, tamamen tarayıcınızda.
Bir görseli HTML, CSS veya JSON'a gömmek için Base64 data URI'sine dönüştürün, tamamen tarayıcınızda.
Bir temel renkten ton ve gölge skalası ile tamamlayıcı, benzer ve üçlü renkler oluşturun.
Herhangi bir görseli tarayıcınızda oluşturulan tam bir favicon setine dönüştürün: .ico, PNG boyutları, Apple touch icon ve web manifest.