File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
main/java/com/instabug/reactlibrary
test/java/com/instabug/reactlibrary Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -1294,4 +1294,21 @@ public void run() {
1294
1294
1295
1295
});
1296
1296
}
1297
+ /**
1298
+ * Enables or disables capturing network body.
1299
+ * @param isEnabled A boolean to enable/disable capturing network body.
1300
+ */
1301
+ @ ReactMethod
1302
+ public void setNetworkLogBodyEnabled (final boolean isEnabled ) {
1303
+ MainThreadHandler .runOnMainThread (new Runnable () {
1304
+ @ Override
1305
+ public void run () {
1306
+ try {
1307
+ Instabug .setNetworkLogBodyEnabled (isEnabled );
1308
+ } catch (Exception e ) {
1309
+ e .printStackTrace ();
1310
+ }
1311
+ }
1312
+ });
1313
+ }
1297
1314
}
Original file line number Diff line number Diff line change @@ -678,12 +678,14 @@ public void testEnableAutoMasking(){
678
678
@ Test
679
679
public void testSetNetworkLogBodyEnabled () {
680
680
rnModule .setNetworkLogBodyEnabled (true );
681
+
681
682
mockInstabug .verify (() -> Instabug .setNetworkLogBodyEnabled (true ));
682
683
}
683
684
684
685
@ Test
685
- public void testSetNetworkLogBodyDisables () {
686
+ public void testSetNetworkLogBodyDisabled () {
686
687
rnModule .setNetworkLogBodyEnabled (false );
688
+
687
689
mockInstabug .verify (() -> Instabug .setNetworkLogBodyEnabled (false ));
688
690
}
689
691
}
You can’t perform that action at this time.
0 commit comments