Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Url response is corrupt, cant read http response - Gideros Forum

Url response is corrupt, cant read http response

YanYan Member
edited March 5 in Bugs and issues
Gideros can't define server response, is there any problems with charset, how to solve, Im frustrating.


Php code:
header('Content-Type: text/html; charset=utf-8');
header('Content-Type: application/json');
 
die(' @ '); // TRIED 1ST (there are no spaces for real, because forum inserts profile link)
die('1'); // TRIED 2ND
die(json_encode(['response' => 'true'])) // TRIED 3RD
Lua code:
 
local url	= "<a href="http://localhost/test.php&quot" target="_blank" rel="nofollow">http://localhost/test.php&quot</a>;
local loader = UrlLoader.new()
 
function onComplete(e)
 
     p(e.data) -- ' @ '
     p(e.data == ' @ ') -- FALSE !!!
     p(tostring(e.data)) -- ' @ '
     p(tostring(e.data) == ' @ ') -- FALSE !!!
 
     p(e.data) -- '1'
     p(e.data == 1) -- FALSE !!!
     p(e.data == '1') -- FALSE !!!
     p(tostring(e.data)) -- '1'
     p(tostring(e.data) == '1') -- FALSE !!!
 
     p(e.data) -- {"response":"true"}
     p(json.decode(e.data)) -- Expected value but found invalid token at character 1 (WHAT THE HELL ???)
 
end
 
loader:load(url)
vk.com/yan_alex

Comments

Sign In or Register to comment.