From 2e4d73e608ee451856a45c29dc7c6aa20a27c986 Mon Sep 17 00:00:00 2001 From: Alessandro Proto Date: Mon, 9 Jan 2023 23:03:02 +0100 Subject: [PATCH] HTTP Library parity to experimental-event branch --- Capy64/LuaRuntime/Libraries/HTTP.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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);