mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-27 00:55:57 +03:00
[GH-ISSUE #664] Ability to add delay for responses #661
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#661
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 @amorphius on GitHub (Oct 21, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/664
Originally assigned to: @NghiaTranUIT on GitHub.
Proxyman version? (Ex. Proxyman 1.4.3)
2.10.0
macOS Version? (Ex. mac 10.14)
mac 10.13
I really need to have ability to delay some responses in scripting. Ideally using Promises. But I was told that's not possible. Maybe there are any workarounds to achieve delays?
@NghiaTranUIT commented on GitHub (Oct 21, 2020):
It seems that JavaScriptCore from Apple doesn’t officially support Promise.
I will find the way to support fetch api, then you can convert your Promise to fetch and make request asynchronously.
@amorphius commented on GitHub (Oct 21, 2020):
It's not only about fetches but implementing simple delay for response when I want to emulate slow connection for particular request.
@NghiaTranUIT commented on GitHub (Oct 22, 2020):
Hey @amorphius, let check out this BETA build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.10.0_Add_Sleep_Func.dmg
Basically, you can use
sleep()function to make the current thread sleep synchronously. Please beware thatsleep()takes milliseconds as a param.For instance,
I tested and it will delay 5 seconds before returning the Response to my client app 🙌
@amorphius commented on GitHub (Oct 22, 2020):
It works, great job! Thank you!