twolfson / grunt-curl

Download files from the internet via grunt.
The Unlicense
73 stars 28 forks source link

username and password for curl #32

Closed whbath closed 9 years ago

whbath commented 9 years ago

How do you add in username and password details ala --user user:pass ?

twolfson commented 9 years ago

These can be added by using src as if it were request parameters:

https://github.com/twolfson/grunt-curl/tree/2.2.0#using-request-options

https://github.com/request/request/tree/v2.55.1#http-authentication

src: {
  url: 'http://google.com',
  auth: {
    username: 'foo',
    password: 'bar'
  }
}
whbath commented 9 years ago

Great, thanks for the quick turn around!