This one i feel is hard to justify one over another. I see so many here at stackoverflow do both the variants. Some just call cURL console commmands externally from their programs(example: curl "content=hello world" -X POST https://example.com -H "charset=UTF-8"
). And others import the library and call it programmatically inside the program.
So my question is for upcoming projects in the future, is it worth the work to include the library and setup all of it. Or is it simply a smarter option to call cURL from command line and read it's responses?
And out of curiosity why doesn't everyone do one of the variants? Why do some people use console commands and other include the libraries, are there maybe some pitfalls later down the line?