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

API to Inject header to URL requests #155

Closed
spolu opened this issue Jul 14, 2014 · 4 comments
Closed

API to Inject header to URL requests #155

spolu opened this issue Jul 14, 2014 · 4 comments

Comments

@spolu
Copy link
Member

spolu commented Jul 14, 2014

No description provided.

@spolu
Copy link
Member Author

spolu commented Oct 15, 2014

related to #169

@spolu spolu added Enhancement and removed Active labels Oct 15, 2014
@morganrallen
Copy link
Contributor

I like the idea of having an event fired for each request. This way requests can be modified, canceled, redirected, logged, etc.

webview.addEventListener("network-request", function(req) {
  if(req.url.indexOf("someApi.json") > -1) {
    req.url = "http://some-local-server/fake.json";
  }

  return req;
}, false);

@spolu
Copy link
Member Author

spolu commented Nov 17, 2014

Looks like a good idea!

@spolu
Copy link
Member Author

spolu commented Nov 18, 2014

Only issue is the performance impact of that. Handling these things client side and the context switching both ways necessary to provide this looks like an overkill to me.

I think we'll start with the ability to set a proxy to all requests for a starter

@spolu spolu closed this as completed in 5c3169e Dec 2, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants