"Struggling with curl post give input from file – any tips?"
hey guys,
i'm trying to use curl post give input from file but keep getting errors. like, i have a json file (`data.json`) and wanna send it in a POST request.
i tried:
`curl -X POST http://example.com/api -d @data.json`
but it’s not working as expected. am i missing something? headers? format?
also, does curl post give input from file differently for different content types?
any help or examples would be awesome! thanks in advance.
(ps: sorry for typos, typing on mobile lol)
hey guys,
i'm trying to use curl post give input from file but keep getting errors. like, i have a json file (`data.json`) and wanna send it in a POST request.
i tried:
`curl -X POST http://example.com/api -d @data.json`
but it’s not working as expected. am i missing something? headers? format?
also, does curl post give input from file differently for different content types?
any help or examples would be awesome! thanks in advance.
(ps: sorry for typos, typing on mobile lol)
