Formateador de JSON
Da formato con dos espacios, compacta JSON y comprueba su sintaxis.
Convert curl -X/-H/-d into fetch and axios snippets.
Se ejecuta en tu navegador — los datos no salen de tu dispositivo
// fetch
fetch('https://api.example.com/v1/items', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer token'
},
body: '{"name":"toco.tools"}'
})
// axios
axios({
method: 'post',
url: 'https://api.example.com/v1/items',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer token'
},
data: '{"name":"toco.tools"}'
})Yes.
No.