DEV Community

Discussion on: What is an API and how to call an API in JavaScript

Collapse
 
manikantamaddipati profile image
Manikanata

Hi,

For consuming any API we use JavaScript fetch() or do we have any framework do consume api?

Thx

Collapse
 
chintanpalan_53 profile image
Chintan Palan

Yes, we use JavaScript fetch for consuming API. Consuming is another term used to say that we have imported data from the given API. So basically, what we have done in our example of taking data from COVID API, we are essentially just consuming the COVID API.
As for other frameworks, as I mentioned above, there are other libraries that help you with fetching and sending data but overall they all work in a pretty similar manner.

Hope that helps