Generate a QR code asset via Netlify Function
Changed onpost/.netlify/functions/generate-qr
Request
- Base URLhttps://qrcodecrafter.com
- Auth
- API key in header X-Agent-Api-Key
- or none
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Generated QR code asset encoded as base64
Example response
{
"success": true,
"dataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"downloadUrl": "/.netlify/functions/generate-qr?value=https%3A%2F%2Fexample.com&format=svg&size=1024",
"contentType": "image/png",
"extension": "png",
"suggestedFilename": "qrcode",
"byteLength": 5342,
"dimensions": {
"width": 1024,
"height": 1024,
"unit": "px"
},
"qrOptions": {
"size": 1024,
"margin": 4,
"errorCorrectionLevel": "H"
}
}Changes
- info
added the media type
application/x-www-form-urlencodedto the request body
- info