cURL command
Generated JavaScript fetch
const options = {
method: 'POST',
headers: {
'content-type': 'application/json',
'authorization': 'Bearer abc123',
},
body: JSON.stringify("{\n \"qty\": 2,\n \"sku\": \"A-1\"\n}"),
};
const response = await fetch('https://api.example.com/orders?dryRun=true', options);
const data = await response.json();
console.log(data);Normalized cURL
curl \
--request POST \
--url https://api.example.com/orders?dryRun=true \
--header 'content-type: application/json' \
--header 'authorization: Bearer abc123' \
--data '{
"qty": 2,
"sku": "A-1"
}'