Skip to content

Commit

Permalink
Removed old IE XDomainRequest client and xhr and xdr interceptors
Browse files Browse the repository at this point in the history
Old IE is no longer supported or tested. Removing code dedicated to old
IE that is not interesting to any other environment.

The client and interceptors will still work, if needed, they can be copied
directly into a project.
  • Loading branch information
scothis committed Jun 16, 2016
1 parent 7709358 commit d613afe
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 565 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ Change Log
- IE 11
- iOS 8 and 9
- Safari 8 and 9
- Removed old IE XDomainRequest client and xhr and xdr interceptors
- include requested URL on response object
- mime interceptor no longer sets Content-Type on requests without an entity

Expand Down
72 changes: 0 additions & 72 deletions client/xdr.js

This file was deleted.

20 changes: 1 addition & 19 deletions docs/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
- [XMLHttpReqest Client](#module-rest/client/xhr)
- [Node Client](#module-rest/client/node)
- [JSONP Client](#module-rest/client/jsonp)
- [IE XDomainRequest Client](#module-rest/client/xdr)


## Overview
Expand Down Expand Up @@ -44,7 +43,7 @@ While it may be tempting to change the default client for application level conc

`rest/client/xhr` ([src](../client/xhr.js))

The default client for browsers. The XHR client utilizes the XMLHttpRequest object provided by many browsers. Most every browser has direct support for XHR today. The `rest/interceptor/ie/xhr` interceptor can provided fall back support for older IE without native XHR.
The default client for browsers. The XHR client utilizes the XMLHttpRequest object provided by many browsers.

**Special Properties**

Expand Down Expand Up @@ -136,20 +135,3 @@ JSONP client for browsers. Allows basic cross-origin GETs via script tags. Thi
<td>pins the name of the callback function, useful for cases where the server doesn't allow custom callback names. Generally not recommended.</td>
</tr>
</table>


<a name="module-rest/client/xdr"></a>
### IE XDomainRequest Client

`rest/client/xdr` ([src](../client/xdr.js))

Cross-origin support available within IE, in particular IE 8 and 9. This client is typically employed via the `rest/interceptor/ie/xdomain` interceptor. Never used as the default client.

**Know limitations**

- only GET and POST methods are available
- must use same scheme as origin http-to-http, https-to-https
- no headers, request or response (the response Content-Type is available)
- no response status code

[Limitation details](http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx)
60 changes: 0 additions & 60 deletions docs/interceptors.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
- [Timeout Interceptor](#module-rest/interceptor/timeout)
- [Fallback Interceptors](#interceptor-provided-fallback)
- [JSONP Interceptor](#module-rest/interceptor/jsonp)
- [Cross Domain Request for IE Interceptor](#module-rest/interceptor/ie/xdomain)
- [ActiveX XHR for IE Interceptor](#module-rest/interceptor/ie/xhr)
- [Custom Interceptors](#interceptor-custom)
- [Interceptor Best Practices](#interceptor-custom-practices)
- [Example Interceptors by Concept](#interceptor-custom-concepts)
Expand All @@ -34,7 +32,6 @@
- [Cancellation](#interceptor-custom-concepts-cancellation)
- [Shared Request/Response Context](#interceptor-custom-concepts-context)
- [Async Request/Response](#interceptor-custom-concepts-async)
- [Override Parent Client (ComplexRequest)](#interceptor-custom-concepts-parent)
- [Abort Request (ComplexRequest)](#interceptor-custom-concepts-abort)


Expand Down Expand Up @@ -931,58 +928,6 @@ client({ path: 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0', para
```


<a name="module-rest/interceptor/ie/xdomain"></a>
#### Cross Domain Request for IE Interceptor

`rest/interceptor/ie/xdomain` ([src](../interceptor/ie/xdomain.js))

Utilizes IE's XDomainRequest support via the [XDomainRequest client](clients.md#module-rest/client/xdr) for making cross origin requests if needed, available and a CORS enabled XMLHttpRequest is not available. XDR request have a number of limitations, see the [XDR client](clients.md#module-rest/client/xdr) for limitation details. Will not interfere if installed in other environments.

This interceptor should be installed as close to the root of the interceptor chain as possible. When a XDomainRequest client is needed, the normal parent client will not be invoked.

**Phases**

- request

**Configuration**

*none*

**Example**

```javascript
client = rest.wrap(xdomain)
.wrap(defaultRequest, { params: { api_key: '95f41bfa4faa0f43bf7c24795eabbed4', format: 'rest' } });
client({ params: { method: 'flickr.test.echo' } }).then(function (response) {
// response from flickr
});
```


<a name="module-rest/interceptor/ie/xhr"></a>
#### ActiveX XHR for IE Interceptor

`rest/interceptor/ie/xhr` ([src](../interceptor/ie/xhr.js))

Attempts to use an ActiveX XHR replacement if a native XMLHttpRequest object is not available. Useful for IE < 9, which does not natively support XMLHttpRequest. Will not interfere if installed in other environments.

**Phases**
- request

**Configuration**

*none*

**Example**

```javascript
client = rest.wrap(xhr);
client({}).then(function (response) {
// normal XHR response, even in IE without XHR
});
```


<a name="interceptor-custom"></a>
## Custom Interceptors

Expand Down Expand Up @@ -1198,11 +1143,6 @@ The interceptors provided with rest.js provide are also good examples. Here are

- [rest/interceptor/mime](#module-rest/interceptor/mime)

<a name="interceptor-custom-concepts-parent"></a>
**Override Parent Client (ComplexRequest)**

- [rest/interceptor/ie/xdomain](#module-rest/interceptor/ie/xdomain)

<a name="interceptor-custom-concepts-abort"></a>
**Abort Request (ComplexRequest)**

Expand Down
50 changes: 0 additions & 50 deletions interceptor/ie/xdomain.js

This file was deleted.

59 changes: 0 additions & 59 deletions interceptor/ie/xhr.js

This file was deleted.

Loading

0 comments on commit d613afe

Please sign in to comment.