mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 10:36:44 +00:00
http response event table go brrr
This commit is contained in:
parent
4a99756c24
commit
b7574af812
1 changed files with 15 additions and 0 deletions
|
@ -155,6 +155,21 @@ public class HTTP : IPlugin
|
|||
else
|
||||
content = await response.Content.ReadAsStringAsync();
|
||||
|
||||
// wip
|
||||
/*
|
||||
_game.LuaRuntime.PushEvent("http_response", L =>
|
||||
{
|
||||
L.PushInteger(requestId);
|
||||
|
||||
L.NewTable();
|
||||
|
||||
L.PushString("success");
|
||||
L.PushBoolean(response.IsSuccessStatusCode);
|
||||
L.SetTable(-3);
|
||||
|
||||
return 2;
|
||||
});*/
|
||||
|
||||
_game.LuaRuntime.PushEvent("http_response", requestId, response.IsSuccessStatusCode, content, (int)response.StatusCode, response.ReasonPhrase);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue