I am using request module in nodejs to download a file(only image file) using this,
request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png')),
or say
request(url).pipe(fs.createWriteStream(filename)),
but I have only url available and I have required to save the file with its actual name, So I have required to found filename from the given url,
please suggest me method which donot extracted last part of url
Thanks in advance...