forked from rojo-rbx/rojo
Use msgpack for API (#1176)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
local HttpService = game:GetService("HttpService")
|
||||
|
||||
local msgpack = require(script.Parent.Parent.msgpack)
|
||||
|
||||
local stringTemplate = [[
|
||||
Http.Response {
|
||||
code: %d
|
||||
@@ -31,4 +33,8 @@ function Response:json()
|
||||
return HttpService:JSONDecode(self.body)
|
||||
end
|
||||
|
||||
function Response:msgpack()
|
||||
return msgpack.decode(self.body)
|
||||
end
|
||||
|
||||
return Response
|
||||
|
||||
Reference in New Issue
Block a user