ToolCabana

Conversor de cURL para fetch

Converte opções admitidas de comandos em solicitações JavaScript editáveis.

Favorites are saved in this browser. Find them in My favorites.

Conversor de cURL para fetch

Your input stays in this browser unless stated otherwise
Clear your input, files and result, and restore the default settings.
Load sample text to explore what this tool can do. This replaces your current input.
0 charactersClear the source text.

Como usar Conversor de cURL para fetch

The cURL to fetch converter turns a cURL command into JavaScript code that calls fetch with the same URL, method, headers and body, then reads the response as text. It understands -X, -H, -d, --data-raw, --data-binary and --url, and ignores -L, --compressed and -s. It only generates code and never sends the request.

  1. Cole a fonte no editor de entrada ou carregue o exemplo integrado.
  2. Verifique o formato de origem antes de executar a operação.
  3. Execute o conversor de cURL para fetch, revise a saída e use os controles disponíveis para copiar ou baixar.

O que esta ferramenta suporta

Converte opções admitidas de comandos em solicitações JavaScript editáveis.

Limites e processamento

As entradas CSV/XLSX são limitadas a 10 MB cada, 200 colunas e 20,000 linhas; a saída combinada é limitada a 20,000 linhas. A avaliação de scripts/filtros JSONPath está desativada. Outras operações aplicam seus controles visíveis e limites de texto.

Fonte de exemplo
curl 'https://example.com/api' -X POST -H 'Content-Type: application/json' --data '{"hello":"world"}'

Perguntas frequentes

Which cURL options are supported?

Supported options are -X or --request, -H or --header, -d, --data, --data-raw, --data-binary and --url. The flags -L, --location, --compressed, -s and --silent are accepted and ignored. Any other option returns an Unsupported cURL option error naming the flag.

What HTTP method is used when the command has a body?

If the command sends data with -d or a --data variant and no method is set, the converter switches the method from GET to POST, as cURL does. An explicit -X value is kept as written.

Why is my cURL command rejected?

Commands must start with curl, contain one http or https URL and use balanced quotes. Shell substitution with backticks or $( ) is refused, and bodies read from a file with @filename are not supported. Paste the literal body instead.

Onde minha entrada é processada?

Esta operação processa sua fonte no seu navegador. Copiar e baixar são ações explícitas; a entrada de origem não é salva em conta nem em histórico.

Quais são os limites de entrada?

As entradas CSV/XLSX são limitadas a 10 MB cada, 200 colunas e 20,000 linhas; a saída combinada é limitada a 20,000 linhas. A avaliação de scripts/filtros JSONPath está desativada. Outras operações aplicam seus controles visíveis e limites de texto.