-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
Use Case: A snippet of javascript code is used to send requests to 2 URLs: http://proxied.org/query and http://origin-server.org/query
- http://proxied.org/query is polled and is sent with the x-retry-after header.
- http://origin-server.org/query is not polled and the endpoint does not accept the x-retry-after header.
Currently, the application can check if a URL will be proxied in the following way:
_isURLAccelerated: {
value: function (url) {
return !!XMLHttpRequest.configuration.getTransportUrl(url);
}
}
A simpler and more understandable API would be to have a boolean such as one of the following examples:
XMLHttpRequest.isURLProxied(url)
XMLHttpRequest.configuration.isURLProxied(url)
XMLHttpRequest.isURLAccelerated(url)
XMLHttpRequest.configuration.isURLAccelerated(url)