react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

docs: Update axios-integration.md

Open Rohit3523 opened this issue 1 year ago • 3 comments

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
  • My change includes tests;
    • [ ] e2e tests added or updated in packages/\*\*/e2e
    • [ ] jest tests added or updated in packages/\*\*/__tests__
  • [ ] I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • [ ] Yes
    • [x] No

Rohit3523 avatar Sep 13 '24 14:09 Rohit3523

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 13, 2024 2:53pm

vercel[bot] avatar Sep 13 '24 14:09 vercel[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 13 '24 14:09 CLAassistant

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar Oct 11 '24 15:10 github-actions[bot]