From de8efb1b5d2a9d053d91c3ddfe9b8622ab314053 Mon Sep 17 00:00:00 2001 From: Layla Manley Date: Mon, 9 Oct 2023 07:01:31 -0400 Subject: [PATCH] iteration --- lib/ccttp.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/ccttp.lua b/lib/ccttp.lua index 95ece40..a6c0a2e 100644 --- a/lib/ccttp.lua +++ b/lib/ccttp.lua @@ -1,9 +1,18 @@ -- Desc: CCTTP Networking Library -- Auth: Layla Manley -- Link: https://gitea.layla.gg/layla/computercraft -local interface Response - status: number - body: string + +Response = { + status = 0, + body = "", + headers = {} +} + +function Response:new(o) + o = o or {} + setmetatable(o, self) + self.__index = self + return o end function get(url: string): Response: