Skip to content

Commit 8e1940a

Browse files
authored
Merge branch 'master' into fix/illegal-invocation
2 parents 974ef39 + 2ec508a commit 8e1940a

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
> Tiny 500b fetch "barely-polyfill"
1010
1111
- **Tiny:** under **500 bytes** of [ES3](https://unpkg.com/unfetch) gzipped
12-
- **Minimal:** just `fetch()` with headers and text/json/xml responses
12+
- **Minimal:** just `fetch()` with headers and text/json responses
1313
- **Familiar:** a subset of the full API
1414
- **Supported:** supports IE8+ _(assuming `Promise` is polyfilled of course!)_
1515
- **Standalone:** one function, no dependencies
@@ -145,8 +145,8 @@ A message related to the `status` attribute, e.g. `OK` for a status `200`.
145145
#### `response.clone()`
146146
Will return another `Object` with the same shape and content as `response`.
147147

148-
#### `response.text()`, `response.json()`, `response.xml()`, `response.blob()`
149-
Will return the response content as plain text, JSON, XML and `Blob`, respectively.
148+
#### `response.text()`, `response.json()`, `response.blob()`
149+
Will return the response content as plain text, JSON and `Blob`, respectively.
150150

151151
#### `response.headers`
152152
Again, Unfetch doesn't implement a full spec-compliant [`Headers Class`](https://fetch.spec.whatwg.org/#headers), emulating some of the Map-like functionality through its own functions:

src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export default typeof fetch == 'function' && typeof window != 'undefined' ? fetc
4040
clone: response,
4141
text: () => Promise.resolve(request.responseText),
4242
json: () => Promise.resolve(request.responseText).then(JSON.parse),
43-
xml: () => Promise.resolve(request.responseXML),
4443
blob: () => Promise.resolve(new Blob([request.response])),
4544
headers: {
4645
keys: () => keys,

test/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ describe('unfetch', () => {
4646
.then( r => {
4747
expect(r).to.have.property('text').that.is.a('function');
4848
expect(r).to.have.property('json').that.is.a('function');
49-
expect(r).to.have.property('xml').that.is.a('function');
5049
expect(r).to.have.property('blob').that.is.a('function');
5150
expect(r).to.have.property('clone').that.is.a('function');
5251
expect(r).to.have.property('headers');

0 commit comments

Comments
 (0)