Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Jaime Barajas
Jaime Barajas
10,459 Points

There's a course or workshop to teach how to convert Curl to javascript?

Is possible to convert a curl to javascript?

Example CURL

// Using cURL curl -H "ssc-api-key: sdasdasdad..." \ -H "ssc-access-key: 213Em12l3..." \ -H "Content-Type: application/json" \ -X "GET" "https://api.cloud.stream.com/api/usage/stream_sources"

I will appreciate very much the help.

2 Answers

Steven Parker
Steven Parker
231,007 Points

Curl is a command line utility, so you might not find a direct conversion for it.

But there are several methods for accessing network resources in JavaScript, and some courses and workshops here that cover them. Two that come to mind are AJAX Basics and Working with the Fetch API.

Jaime Barajas
Jaime Barajas
10,459 Points

Thank you, I will check them.