Skip to content

Ulydev/wapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wapi

wapi is a simple async HTTP library which uses LÖVE threads

image

Setup

Require library and update it

local wapi = require "webapi"

function love.update(dt)
  wapi.update()
end

Make request

request = wapi.request({
  method = "GET",
  url = "http://jsonplaceholder.typicode.com/posts/1"
}, function (body, headers, code)

  print(body)

end)

Usage

wapi.request(args, callback)

args is a table containing request arguments. See Lua HTTP support

wapi.update()

update all running requests

wapi.cancel(request)

cancel an active request

About

Simple async HTTP requests with LÖVE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages