You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for axios; I use it in a React Native app particularly for onUploadProgress which works great.
However, as part of debugging issues, it would be really nice if there was a way to get the request's local ephemeral port so that I can print it to debug logs. This can then help directly find a TCP stream in a tcpdump. Is there any way to get this in axios or are there other libraries you'd recommend (that also have something like onUploadProgress)? Thanks!
Example of what I'd like in the onContextInfo callback:
const res = await axios({
method: "POST",
url: "https://example.com/upload",
onContextInfo: (contextInfo) => {
console.log("local port: " + contextInfo.localPort);
// Ideally, it'd also be great to have the local IP address here if available, and also remote
// host and port, even though we'll generally know that ahead of time, but it'll make it easier
// to make a generic onContextInfo callback logger.
},
onUploadProgress: (progressEvent) => {
console.log("onUploadProgress: " + Math.round( (progressEvent.loaded * 100) / progressEvent.total ));
},
timeout: 60000,
});
The text was updated successfully, but these errors were encountered:
This issue is being automatically closed because it does not follow the issue template. Please read the issue template carefully and follow all of the instructions when opening a new issue.
Describe the issue
Thank you for axios; I use it in a React Native app particularly for
onUploadProgress
which works great.However, as part of debugging issues, it would be really nice if there was a way to get the request's local ephemeral port so that I can print it to debug logs. This can then help directly find a TCP stream in a tcpdump. Is there any way to get this in axios or are there other libraries you'd recommend (that also have something like
onUploadProgress
)? Thanks!Example of what I'd like in the
onContextInfo
callback:The text was updated successfully, but these errors were encountered: