mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-26 08:35:53 +03:00
[GH-ISSUE #1672] Map remote tool, add support for overriding method #1665
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#1665
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?
Originally created by @webuniverseio on GitHub (Jun 8, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1672
Description
In map remote tool you can override schema, ports, host, etc but there is no option to override method
Why this feature/change is important?
When you're working with graphql in dev you may be using POST method, but in prod, in order to use persistent queries you may be using GET method. When remapping dev to prod I currently can't use map remote tool in this case because I can't change method (so when request in browser is made as POST, it arrives as POST to mapped host).
Please consider adding support for this use case, thank you!
@NghiaTranUIT commented on GitHub (Jun 9, 2023):
@webuniverseio
Can you simply use the Scripting to achieve the same thing?
It's really simply to translate your Map Remote to the JS code: Here is the sample:
All Snippet code: https://docs.proxyman.io/scripting/snippet-code#change-request-destination-scheme-host-port-path
@webuniverseio commented on GitHub (Jun 9, 2023):
Hi @NghiaTranUIT , this is true I thought I could use scripting but I find it would be even simpler to have that option in map remote tooling since all other remapping are already present and that is the only one which I wish was there.
Thank you for the snippet!
@webuniverseio commented on GitHub (Jun 9, 2023):
I gave scripting a try, it worked fairly well, but I had to do a bit extra to set query parameters. Lets say I have a query like this which I need to remap
I had to first split that string by &, then reassign values to request.queries[key] = value and value had to be url decoded. I learned something about scripting which is helpful, but I wish there was a simpler way (scripting samples mention just request.queries[x]).
I also had to set a cookie header to avoid auth error for backend api, so looks like I could not avoid scripting in the first place. Thanks for your help with this, I'll close this ticket.