How to use curl in javascript

I am writing a chrome extension and I want to use Curl to get links to download gmail attachments. How am I supposed to do this? I'm new to curl and I don't know how can I use the curl library in javascript?

+6
source share
2 answers

You cannot use cURL directly in Javascript. You can do AJAX. So one solution would be to install a php script somewhere that you can use to get links from gmail.

EDIT: here is the implementation of cURL in javascript here . Check this.

+6
source

As a reference, the same origin policy in javascript. Although there seem to be workarounds, security will always be a problem.

+1
source

Source: https://habr.com/ru/post/922258/


All Articles