ProxymanApp / ProxymanApp/Proxyman
[Scripting] Support native URL and URLSearchParams
Open
@NghiaTranUIT is already working on this.
Since Oct 9, 2023.
✅ Done
enhancement
- Dominant language
- No language data
- Stars
- 7k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
Description
Some users complain that this script can't work:
async function onRequest(context, url, request) {
console.log(url);
const urlItem = new URL("https://example.com?foo=1&bar=2");
const params1 = new URLSearchParams(urlItem.search);
// Done
return request;
}
and get the following error:
Error: ReferenceError: Can't find variable: URL
Error: ReferenceError: Can't find variable: URLSearchParams
The problem is:
URLandURLSearchParamsare not natively supported by JavascriptCore framework.
Why this feature/change is important?
- Can use URL and URLSearchParams
- Easier to deconstruct the URL and handle the Search Param.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.