DEV Community

What is cURL and why is it all over API docs?

Amara Graham on February 19, 2019

Photo by Markus Spiske on Unsplash I don’t know what your corner of the internet looks like, but mine looks something like this: “I just want to...
Collapse
 
tyronemapp profile image
Tyrone Mapp •

Great article, helped me understand what on earth curl is.

I'm starting developing apps against the Atlassian API, have done some PHP, Python, Scripting, VBS, C# etc in the past, nothing too fancy but never done API dev work before. tbf Im still trying to work out how I access their API and what language I should be using in the browser to work with their API but small steps ... :)

Collapse
 
missamarakay profile image
Amara Graham •

There are a number of free APIs with good data to play around with too, some have auth some don't. I feel like I mentioned it somewhere, but I'm not seeing it in this post. Here is a good list in case you want to play around with something that isn't the Atlassian API- github.com/public-apis/public-apis

Happy coding!

Collapse
 
biros profile image
Boris Jamot ✊ / •

cURL is very powerful and as you said, available on quite any computer.
That being said, I found it a bit messy and inconsistent. Syntax varies between GET and POST, and the output is not (by default) the plain HTTP answer.
That's why I prefer using httpie which is an awesome user-friendly alternative to curl.
Please have a look at it and tell me what you think!

Thanks for your post!

Collapse
 
missamarakay profile image
Amara Graham •

Definitely looks slick! I can see why you would prefer it over curl. Do you know of any API docs that use HTTPie in their examples?

Collapse
 
biros profile image
Boris Jamot ✊ / •

No, sorry. But the httpie's doc is great !

Thread Thread
 
xoxopowo profile image
¡ xoxoPoWo ! •

It’s just a wrapper around curl.

Thread Thread
 
missamarakay profile image
Amara Graham •

All roads lead to curl!

Collapse
 
jimmy19742 profile image
jimmy19742 •

I'm a beginner. I found this post via a SE but I have been using cURL and libcurl to check the raw headers ( of my competitors usually) , the fetch some content ( to output in a file) but not to update a content via REST API or to incorporate an API to an endpoint.
Always from Android OS.
Thank You for this article.

Collapse
 
didaarda profile image
Dida Arda •

I found a GitHub project that converts curl commands into PHP curl code. Check this out

incarnate.github.io/curl-to-php/

Thank me later🌠

Collapse
 
dana94 profile image
Dana Ottaviani •

I typically use Postman to test new APIs but I appreciate this explanation on what curl is since I hear about it a lot and have not used it before. 👍

Collapse
 
akinkunmi006 profile image
Akinkunmi •

I am using Linux, Ubuntu precisely but have never used curl, please include it to the article for newbies like us.

Thank you.

Collapse
 
sahilrajput03 profile image
Sahil •

i prefer curl over postman: github.com/sahilrajput03#stop-usin...