diff --git a/Capy64/LuaRuntime/Libraries/HTTP.cs b/Capy64/LuaRuntime/Libraries/HTTP.cs index 5583128..59946b2 100644 --- a/Capy64/LuaRuntime/Libraries/HTTP.cs +++ b/Capy64/LuaRuntime/Libraries/HTTP.cs @@ -155,10 +155,7 @@ public class HTTP : IPlugin else content = await response.Content.ReadAsStringAsync(); - if (response.IsSuccessStatusCode) - _game.LuaRuntime.PushEvent("http_response", requestId, content, (int)response.StatusCode); - else - _game.LuaRuntime.PushEvent("http_failure", requestId, content, (int)response.StatusCode, response.ReasonPhrase); + _game.LuaRuntime.PushEvent("http_response", requestId, response.IsSuccessStatusCode, content, (int)response.StatusCode, response.ReasonPhrase); }); L.PushInteger(requestId);