Rebooting
Rebooting

Reputation: 2938

How to use Curl in javascript

I am writing a chrome extension and I want to use Curl to get me the download links of the gmail attachments. How should i do it? I am new to curl and i don't know how would i able to use the curl library in javascript ?

Upvotes: 6

Views: 31914

Answers (2)

chris_bart0n
chris_bart0n

Reputation: 15

Just as a reference same origin policy in javascript. While there appears to workarounds this, security is always going to be a concern.

Upvotes: 1

Prasanth
Prasanth

Reputation: 5258

You can't use cURL directly in Javascript. You can do AJAX though. So one solution would be to setup a php script somewhere that you can use for getting links from gmail.

EDIT: There is an implementation of cURL in javascript here. Check it out.

Upvotes: 6

Related Questions