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

wrap safeApp nodejs webfetch to be able to handle any acceptable browser URL (eg: `localhost) #900

Open
happybeing opened this issue Jul 12, 2019 · 3 comments

Comments

@happybeing
Copy link

Using SAFE Browser mock 0.14.0 to access the same resource in two ways:

  • WORKS: type http://localhost:8000/config.txt into browser address bar
  • FAILS: using safeApp.webFetch('http://localhost:8000/config.txt', {method:'GET'})

OS: Ubuntu 18.10

@joshuef
Copy link
Collaborator

joshuef commented Jul 16, 2019

Ah, right now webFetch is only setup for accessing safe:// urls. It doesn't do any handling of http.

It should work if you use a standard browser fetch though.

@happybeing
Copy link
Author

I think it would be best if this was fixed so that using mock will work as well as live, when for example doing webFetch('/config.txt')

@joshuef
Copy link
Collaborator

joshuef commented Aug 2, 2019

yeh that'd make sense.

So this issue is probably more like 'wrap safeApp nodejs webfetch to be able to handle any acceptable browser URL (eg: localhost)

@joshuef joshuef changed the title webFetch() fails in mock accessing http://localhost:8000/config.txt wrap safeApp nodejs webfetch to be able to handle any acceptable browser URL (eg: `localhost) Aug 2, 2019
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

2 participants