Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Fix CURL snippet format
#9
by
pengqun
- opened
Problem
The current CURL snippet generation has a Incorrect Header Format issue: headers were being formatted using JSON.stringify(headers) which produces invalid CURL syntax like -H {"Content-Type":"application/json"} instead of the correct -H "Content-Type: application/json" format.
Solution
This PR address the issue by replacing JSON.stringify(headers) with proper CURL header formatting. Each header is now correctly formatted as -H "key: value", and multiple headers are properly separated with line continuation ().
I tested and verified this change in this forked space: https://huggingface.co/spaces/pengqun/hub-api-playground
pengqun
changed pull request status to
open

