- From: Galen-Yip <notifications@github.com>
- Date: Wed, 07 Dec 2016 08:17:36 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Wednesday, 7 December 2016 16:18:30 UTC
currently, we write code as below if we need json response
```js
fetch(myRequest)
.then(function(response) {
return response.json();
})
.then(function(res) {
// ...
});
```
wht not add an option of dataType optionally like jQuery
```
fetch(myRequest, {
dataType: 'json'
})
.then(function(response) {
return response.json();
})
.then(function(res) {
// ...
});
```
@annevk hope your reply
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/430
Received on Wednesday, 7 December 2016 16:18:30 UTC