mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-25 16:15:55 +03:00
[GH-ISSUE #600] scripting no working #597
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#597
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 @trycatchx on GitHub (Aug 28, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/600
Originally assigned to: @NghiaTranUIT on GitHub.
Proxyman version
Proxyman 2.5.1
macOS Version?
mac 10.15.5
I want to unzip my http Response
step1:
I use pako.js ,and put it into
libsfolderstep2:
i create Pako.js file put into
addonsfolder, is to exposeinflatefunctionstep3:
open scripting and enter the following code :
Console output:
begin
❌Error: incorrect header check
❌Error: Could not convert JSvalue to Dictionary. Please make sure the return value is a JS dictionary (Object)
can someone please tell me what went wrong ?
@NghiaTranUIT commented on GitHub (Aug 28, 2020):
Let me investigate why it doesn't work in your case.
Btw, can you add this log on the onResponse func? I would like to see the Content-Type and what the value of body is @zhangchaojiong
@NghiaTranUIT commented on GitHub (Aug 28, 2020):
Btw, It's better than I should provide a built-in addon for unzip/zip tasks.
@NghiaTranUIT commented on GitHub (Aug 28, 2020):
Thanks. Since your Content-Type is text/plain, so the
response.bodyis a string, not JSON Object. Thus, you don't need to convert to JSON String (JSON.stringify).@NghiaTranUIT commented on GitHub (Aug 28, 2020):
Please try to remove this line and pass the response.body to the unzip() function
You can use check the type of
typeof(response.body)to see what is the type before working on 👍@trycatchx commented on GitHub (Aug 28, 2020):
Thanks Reply @NghiaTranUIT
typeof(response.body) is string
i remove this line
JSON.stringifyi alway get the same result :
Then, I changed the code to this:
Console output:
I guess, is
pako.jsnot successfully linked?@NghiaTranUIT commented on GitHub (Aug 28, 2020):
Let me see 👍
@trycatchx commented on GitHub (Aug 28, 2020):
@NghiaTranUIT I made it work
this is my code:
Console output:
@NghiaTranUIT commented on GitHub (Aug 28, 2020):
Glad to hear that 😄
I'm not sure why
var b64Data = "H4sIAAAAAAAAAwXB2w0AEBAEwFbWl2Y0IW4jQmziPNo3k6TuGK0Tj/ESVRs6yzkuHRnGIqPB92qzhg8yp62UMAAAAA==";doesn't work. The same value is working on the web@trycatchx commented on GitHub (Aug 28, 2020):
btw, Can you provide a built-in addon for unzip/zip tasks? Make work easier!
@NghiaTranUIT commented on GitHub (Aug 28, 2020):
Sure, I will open the ticket for it 👍
@trycatchx commented on GitHub (Aug 28, 2020):
@NghiaTranUIT thx!
@NghiaTranUIT commented on GitHub (Aug 29, 2020):
Good new @zhangchaojiong I discover why you weren't able to decode with your string
It's because the atob/btoa funcs are different from base64Encode/base64Decode that Proxyman provides 😮
I fixed it and will send you an update today 👍
Work fine with your code
@NghiaTranUIT commented on GitHub (Aug 29, 2020):
@zhangchaojiong let check out this build: https://download.proxyman.io/beta/Proxyman_2.5.1_Add_atob_btoa.Add_Pako.dmg
notes