[GH-ISSUE #1779] Unable to use fetch or XMLHttpRequest APIs? #1773

Open
opened 2026-03-03 19:54:17 +03:00 by kerem · 2 comments
Owner

Originally created by @cHaLkdusT on GitHub (Sep 25, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1779

Description

I'm currently trying to write a script, depending on the response, I would like to fire an HTTP request. I tried writing the request using fetch and XMLHttpRequest, however, I got an error:

  • Error: ReferenceError: Can't find variable: fetch
  • Error: ReferenceError: Can't find variable: XMLHttpRequest

What is the correct way of firing an HTTP request using Proxyman scripting?

Originally created by @cHaLkdusT on GitHub (Sep 25, 2023). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1779 ## Description <!-- What do you need help with? --> I'm currently trying to write a script, depending on the response, I would like to fire an HTTP request. I tried writing the request using `fetch` and `XMLHttpRequest`, however, I got an error: * Error: ReferenceError: Can't find variable: fetch * Error: ReferenceError: Can't find variable: XMLHttpRequest What is the correct way of firing an HTTP request using Proxyman scripting?
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 25, 2023):

@cHaLkdusT here is your snippet code: https://docs.proxyman.io/scripting/snippet-code#get-request-with-query

fetch and XMLHttpRequest are not available on JavascriptCore (developed by Apple). It's not NodeJS env.

<!-- gh-comment-id:1732816231 --> @NghiaTranUIT commented on GitHub (Sep 25, 2023): @cHaLkdusT here is your snippet code: https://docs.proxyman.io/scripting/snippet-code#get-request-with-query `fetch` and `XMLHttpRequest` are not available on JavascriptCore (developed by Apple). It's not NodeJS env.
Author
Owner

@cHaLkdusT commented on GitHub (Sep 25, 2023):

Excellent! Thanks for the swift response @NghiaTranUIT!

<!-- gh-comment-id:1732817197 --> @cHaLkdusT commented on GitHub (Sep 25, 2023): Excellent! Thanks for the swift response @NghiaTranUIT!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1773
No description provided.