Instabug-React-Native
Instabug-React-Native copied to clipboard
Add `NetworkLogger.setFilter`
Description of the change
Allows passing predicates instead of strings to filter network requests.
The deprecated method
NetworkLogger.setRequestFilterExpression('network.requestHeaders[\'accept\'] === \'application/json\'');
The new method
NetworkLogger.setFilter(network => network.requestHeaders['accept'] === 'application/json');
Type of change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Related issues
Issue links go here
Checklists
Development
- [ ] Lint rules pass locally
- [ ] The code changed/added as part of this pull request has been covered with tests
Code review
- [ ] This pull request has a descriptive title and information useful to a reviewer
- [ ] Issue from task tracker has a link to this pull request
Codecov Report
Merging #708 (bab5b6e) into release/11.0.0 (0f6e548) will increase coverage by
0.02%
. The diff coverage is92.30%
.
@@ Coverage Diff @@
## release/11.0.0 #708 +/- ##
==================================================
+ Coverage 88.84% 88.86% +0.02%
==================================================
Files 22 22
Lines 457 458 +1
Branches 91 91
==================================================
+ Hits 406 407 +1
Misses 43 43
Partials 8 8
Impacted Files | Coverage Δ | |
---|---|---|
modules/NetworkLogger.js | 94.73% <92.30%> (+0.14%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 0f6e548...bab5b6e. Read the comment docs.
This issue has been automatically marked as pending feedback because we need additional information to be able to investigate it further. It will be closed in 7 days if it remains inactive. Thank you for your contributions.
This issue has been automatically closed since we haven't heard back from you. Please feel free to re-open the issue if you have more information to add.