# Conversor de cURL para fetch

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

[Open tool](https://www.toolcabana.com/pt-br/curl-to-fetch-converter) · [Utilitários para desenvolvedores](https://www.toolcabana.com/pt-br/category/developer-utilities)

Tool ID: curl-to-fetch-converter. Requested language: pt-BR. Description language: pt-BR. Complete guide translation: yes.

## Overview (en)

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.

## Supported tasks (pt-BR)

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

## Steps (pt-BR)

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.

## Settings

No additional settings.

## Limitations (pt-BR)

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.

## Example input

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

## Privacy and connections (pt-BR)

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.

## Questions (pt-BR)

### 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.

## Related tools

- [JSONPath explorer](https://www.toolcabana.com/pt-br/jsonpath-explorer)
- [JSON to Zod schema generator](https://www.toolcabana.com/pt-br/json-to-zod-schema-generator)
- [Unix permissions calculator](https://www.toolcabana.com/pt-br/unix-permissions-calculator)
- [Semver range tester](https://www.toolcabana.com/pt-br/semver-range-tester)
