mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #487] [MERGED] Network Strategies #2650
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#2650
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/487
Author: @AndrewBastin
Created: 1/14/2020
Status: ✅ Merged
Merged: 1/15/2020
Merged by: @AndrewBastin
Base:
master← Head:refactor/network-strategy📝 Commits (7)
61d7dcfAdded AxiosStrategy and ProxyStrategy Network Strategies3726f0aAdded sendNetworkRequest to detect appropriate strategy and use it5ef1b5bRefactor index.vue to use Network Strategies3a8b433Refactor graphql page to use Network Strategiesbd008f4Refactor network and ProxyStrategy code1b783fdMerge branch 'master' into refactor/network-strategy061f86f🐛 Fixed Nuxt loader won't finish after response📊 Changes
5 files changed (+39 additions, -28 deletions)
View changed files
➕
functions/network.js(+13 -0)➕
functions/strategies/AxiosStrategy.js(+9 -0)➕
functions/strategies/ProxyStrategy.js(+13 -0)📝
pages/graphql.vue(+2 -15)📝
pages/index.vue(+2 -13)📄 Description
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.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.