Best-effort parser for common curl shapes (-X, -H, -d). Review before pasting secrets.
const res = await fetch("https://api.example.com/v1", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: "{",
});
const data = await res.json();const { data } = await axios({
url: "https://api.example.com/v1",
method: "post",
headers: {
"Content-Type": "application/json"
},
data: {,
});