community
community copied to clipboard
fix(UrlRequest): Add "on_finish" and add alternative implementation
- Added "on_finish" callback to URlRequest, it fires always when the request is done
- Added alternative implementation for UrlRequest based on REQUESTS lib
- It have also implemented "on_finish" and "auth" params for easy BASICAUTH handling
- Refactored tests of new implementation to be mocked by RESPONSES, so we dont need real network to test nor we dont ping real servers during tests
Maintainer merge checklist
- [ ] Title is descriptive/clear for inclusion in release notes.
- [ ] Applied a
Component: xxxlabel. - [ ] Applied the
api-deprecationorapi-breaklabel. - [ ] Applied the
release-highlightlabel to be highlighted in release notes. - [ ] Added to the milestone version it was merged into.
- [ ] Unittests are included in PR.
- [ ] Properly documented, including
versionadded,versionchangedas needed.
Thanks for opening your first pull request here! 💖 Please check out our contributing guidelines.
Iam not sure if my changes in "setup" are ok, never changed stuff in setup of any package I just wanted the project to download requests and responses with it [they are wide used in real world]
this new implementation have same interface as old "UrlRequest" just changed backend to more flexible [and tests are now made as they should be made]
Congrats on merging your first pull request! 🎉🎉🎉