curl --request POST \
--url https://api.iotools.cloud/v1/tool/nginx-formatter \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputConfig": "# Main site\nhttp {\ninclude mime.types;\ndefault_type application/octet-stream;\nserver {\nlisten 80;\nserver_name example.com www.example.com;\nroot /var/www/html;\nlocation / {\ntry_files $uri $uri/ /index.html;\n}\nlocation /api/ {\nproxy_pass http://backend;\nproxy_set_header Host $host;\n}\n}\n}",
"indentStyle": "4",
"braceStyle": "same",
"semicolonSpacing": "none",
"normalizeComments": "true",
"removeBlankLines": "true",
"alignDirectives": ""
}
'