We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cccef7 commit 207cd6eCopy full SHA for 207cd6e
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "react-fetch-mock",
3
- "version": "0.6.2",
+ "version": "0.7.0",
4
"description": "fetch mock for reactjs",
5
"main": "index.js",
6
"scripts": {
src/response.js
@@ -22,6 +22,14 @@ class Response {
22
return this[_statusText];
23
}
24
25
+ get ok() {
26
+ if (this.status >= 200 && this.status < 300) {
27
+ return true;
28
+ } else {
29
+ return false;
30
+ }
31
32
+
33
text() {
34
try {
35
return Promise.resolve(JSON.stringify(this[_data]));
0 commit comments