Skip to content

Commit 3dde3a7

Browse files
committed
💎 Bump version to 8.0.18
2 parents 63814f7 + 0593ef8 commit 3dde3a7

File tree

3 files changed

+1
-88
lines changed

3 files changed

+1
-88
lines changed

index.js

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,59 +5,13 @@ import {
55
Platform
66
} from 'react-native';
77
let { Instabug } = NativeModules;
8-
import interceptor from './utils/NetworkInterceptor.js';
98
import InstabugUtils from './utils/InstabugUtils.js';
109
import BugReporting from './modules/BugReporting.js';
1110
import Surveys from './modules/Surveys.js';
1211
import FeatureRequests from './modules/FeatureRequests.js';
1312

1413
InstabugUtils.captureJsErrors();
1514

16-
var jsonObject = {
17-
url: '',
18-
requestBody: '',
19-
responseBody: '',
20-
method: '',
21-
responseCode: undefined,
22-
headers: ''
23-
}
24-
25-
// Register the interceptor for fetch requests
26-
interceptor.register({
27-
request: function (url, config) {
28-
// Modify the url or config here
29-
jsonObject.url = url;
30-
if(!config || !config.method) {
31-
jsonObject.method = 'GET';
32-
}
33-
if(config) {
34-
if(config.body) {
35-
jsonObject.requestBody = config.body;
36-
} else {
37-
jsonObject.requestBody = '';
38-
}
39-
if(config.method) {
40-
jsonObject.method = config.method;
41-
}
42-
if(config.headers) {
43-
jsonObject.headers = config.headers;
44-
} else {
45-
jsonObject.headers = '';
46-
}
47-
}
48-
return [url, config];
49-
},
50-
response: function (response) {
51-
// Modify the reponse object;
52-
jsonObject.responseCode = response.status;
53-
jsonObject.responseBody = response._bodyText ? response._bodyText : '';
54-
if (Platform.OS === 'android') {
55-
Instabug.networkLog(JSON.stringify(jsonObject));
56-
}
57-
return response;
58-
}
59-
});
60-
6115
/**
6216
* Instabug
6317
* @exports Instabug

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "instabug-reactnative",
3-
"version": "8.0.17",
3+
"version": "8.0.18",
44
"description": "React Native plugin for integrating the Instabug SDK",
55
"main": "index.js",
66
"repository": {

utils/NetworkInterceptor.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)