I too am getting this problem this is my error
"Thread #1 : Error occurred : Failed to get page http://ip.bablosoft.com/?requestid=88198 with HttpClient"
It seems I keep sending GET requests but am getting nothing in return. Is this just a temporary bug on bablosofts side? or is it a fixable error on my side, let me know what you guys think
HTTP requests with javascript/npm
-
Hello guys,
is there a way to make http requests via code execution and if so how?
When I try something in BAS it always gives a parse or syntax error.At the end I would like to make a request like this:
var filePath = [[FILE_PATH]]; var uploadUrl = [[URL]]; HTTPClient.Request({ url: uploadUrl, method: 'PUT', headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0', 'Accept': 'application/xml, text/xml, */*; q=0.01', 'Accept-Language': 'en-US,en;q=0.5', 'Accept-Encoding': 'gzip, deflate, br', 'Content-Type': 'application/octet-stream', 'Content-Length': [[CONTENT_LENGTH]], 'Referer': 'https://xxx.com/', 'x-amz-server-side-encryption': 'AES256', 'x-amz-acl': 'private', 'Content-Disposition': 'attachment;filename="' + [[FILE_NAME]] + '"; filename*=utf-8\'\'' + [[FILE_NAME]], 'x-amz-storage-class': 'STANDARD', 'x-amz-meta-user-id': [[AMZ_UID]], 'Origin': 'https://xxx.com' }, body: File.ReadBinary(filePath), success: function(response) { Log(response.body); }, fail: function(response) { Log('Error on upload: ' + response.body); } });Thank you for helping
-
@basmail said in HTTP requests with javascript/npm:
Hello guys,
is there a way to make http requests via code execution and if so how?
When I try something in BAS it always gives a parse or syntax error.At the end I would like to make a request like this:
Thank you for helping
You can't send a request via "Execute code" via js like you can via the browser console. Use node js
-
-
@basmail said in HTTP requests with javascript/npm:
@Fox said in HTTP requests with javascript/npm:
You can't send a request via "Execute code" via js like you can via the browser console. Use node js
Ok, how is it done in this complex structure? There is not even a log when something fails
Use node js
-
@basmail said in HTTP requests with javascript/npm:
@Fox said in HTTP requests with javascript/npm:
Use node js
Yes I got that, but how is it done in node.js with this complex structure? There is not even a log when something fails...
Have you tried searching the forum for topics where users discussed sending requests from node js?