react-native-firebase
react-native-firebase copied to clipboard
docs: Update axios-integration.md
Description
This PR addresses an issue with the newHttpMetric
function in the Firebase Performance Monitoring documentation. According to the documentation, when tracking HTTP request performance (e.g., using Axios), the HTTP method needs to be passed in uppercase. However, the config.method
from Axios returns the method in lowercase, causing the following error:
[Error: firebase.perf().newHttpMetric(_, *) 'httpMethod' must be one of CONNECT, DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, TRACE.]
As a result, this error prevents the use of httpMetric
in response monitoring.
The issue was resolved by adding the toUpperCase()
method to the HTTP method before passing it to newHttpMetric
. The documentation has been updated to reflect this requirement.
Related issues
None
Checklist
- I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [x] Yes
- My change supports the following platforms;
- [x]
Android
- [x]
iOS
- [x]
- My change includes tests;
- [ ]
e2e
tests added or updated inpackages/\*\*/e2e
- [ ]
jest
tests added or updated inpackages/\*\*/__tests__
- [ ]
- [ ] I have updated TypeScript types that are affected by my change.
- This is a breaking change;
- [ ] Yes
- [x] No