-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network Strategies #487
Network Strategies #487
Conversation
DeepCode's analysis on #061f86 found:
💬 This comment has been generated by the DeepCode bot, installed by the owner of the repository. The DeepCode bot protects your repository by detecting and commenting on security vulnerabilities or other critical issues. |
Hey @AndrewBastin, TravisBuddy Request Identifier: 74ebcac0-368d-11ea-b1be-0700b914e46e |
Axios progress bar seems to be broken. To reproduce:
Except this, I couldn't find any bugs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Well, the AxiosStrategy doesn't use the |
Well axios automatically bind it's progress to Nuxt's progress bar. We can turn that off, and invoke progress manually. Lemme find a fix for that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of comments.
Hey @AndrewBastin, TravisBuddy Request Identifier: 5072dcd0-36ef-11ea-a8cf-c90382c1967d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@liyasthomas what about the progress bar issue ? |
Fix coming in few mins |
This PR intends to introduce Network Strategies into Postwoman.
Network Strategies are basically functions which take in the Postwoman Store and the request config and returns a Promise for the response. It generalizes the network request making process and makes further introduction of features easier.
Currently, this PR introduces 2 Network Strategies
Currently, Network Strategies allow its consumers to not worry about whether proxy is enabled, the
sendNetworkRequest
(found in functions/network.js) function will detect the appropriate strategy from the available and executes that. But in the future, when we plan to add new strategies (for e.g for native), we do not need to worry about rewriting the consumers to adopt those.