async/await Request
1. What's it?
From Proxyman macOS v3.5.0 and Windows/Linux v2.11.0 or later, you can use async / await
to make an HTTP/HTTPS call for retrieving external resources inside your Script.
Sample: POST Request with JSON Body (macOS)
2. How to use on macOS?
Method
Output format
Sample Code
3. How to use on Windows/Linux?
For example:
4. Notes
Make sure you defined the async function on
onRequest()
andonResponse()
:
Request Timeout is 10 seconds.
The inline HTTP Request doesn't go through the Proxyman Proxy, so it isn't affected by other debugging tools.
Use can use
await $http.get()
on bothonRequest()
andonResponse()
Make sure the Body type is matched with the Content-Type header.
JSON Body with application/json
Encoded form Body with application/x-www-form-urlencoded
Last updated