Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file protocol support #2229

Closed
eshengsky opened this issue May 31, 2016 · 5 comments
Closed

file protocol support #2229

eshengsky opened this issue May 31, 2016 · 5 comments

Comments

@eshengsky
Copy link

I found that if I pass a file protocol string as the first parameter, it shows 'Invalid URI' as error.
example:

request('file://skysun/Download/1.txt', (err, response, body) => {
        if (err) {
            callback(err);
        } else {
            callback(null, body);
        }
    })

Dose Request not suppert file protocal? Or any other solution?
thanks!

@eshengsky eshengsky changed the title file protocol suppert file protocol support May 31, 2016
@sporkmonger
Copy link

Not sure if it'll fix, but file protocol URLs should generally be three '/'s and an absolute path, not two.

@eshengsky
Copy link
Author

@sporkmonger the path is an shared path, and two '/'s works well when I open it in Chrome.

@tommedema
Copy link

Why was this closed? The issue is not resolved, file:/// paths currently result in an error being thrown such as

Error: Invalid URI "file:///Users/tommedema/Drive/projects/forks/tm-web-resource-inliner/test/cases/assets/export.js"

@stale
Copy link

stale bot commented Nov 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@reconbot
Copy link
Contributor

reconbot commented Apr 1, 2019

Request is now in maintenance mode and wont be merging any new features. Please see #3142 for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants