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() {
12941294
12951295 });
12961296 }
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+ }
12971314}
Original file line number Diff line number Diff line change @@ -678,12 +678,14 @@ public void testEnableAutoMasking(){
678678 @ Test
679679 public void testSetNetworkLogBodyEnabled () {
680680 rnModule .setNetworkLogBodyEnabled (true );
681+
681682 mockInstabug .verify (() -> Instabug .setNetworkLogBodyEnabled (true ));
682683 }
683684
684685 @ Test
685- public void testSetNetworkLogBodyDisables () {
686+ public void testSetNetworkLogBodyDisabled () {
686687 rnModule .setNetworkLogBodyEnabled (false );
688+
687689 mockInstabug .verify (() -> Instabug .setNetworkLogBodyEnabled (false ));
688690 }
689691}
You can’t perform that action at this time.
0 commit comments