Anyone got lure working? Or some other Https thingy??

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
Gunroar:Cannon()
Party member
Posts: 1101
Joined: Thu Dec 10, 2020 1:57 am

Anyone got lure working? Or some other Https thingy??

Post by Gunroar:Cannon() »

I got this from github and didn't know how to require it so I started from require ("build/lua/lure") and trying to fix errors to get the Http request (so I can do leaderboards) but it seems hopeless. Is there an alternative or an already pure lua (no .so or .dll) solution so I can use something like Lootlocker or dreamlo?
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
mr_3tianne
Prole
Posts: 5
Joined: Fri Nov 04, 2022 12:44 pm

Re: Anyone got lure working? Or some other Https thingy??

Post by mr_3tianne »

Just use the built in networking module (LuaSocket).

Code: Select all

local http = require("socket")

http.request({
	method = "GET",
	url="http://your.url/",
})
User avatar
ivan
Party member
Posts: 1912
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Anyone got lure working? Or some other Https thingy??

Post by ivan »

I managed to get luasec working but it is not pretty.
A better option is https.dll as described in my topic:
viewtopic.php?f=4&t=93856
This is not pure Lua, but it works quite well.
The only downside is that we need a uniform way to include this library between Love2D distributions.
This is necessary so that the same Lua code would work across platforms.
User avatar
Gunroar:Cannon()
Party member
Posts: 1101
Joined: Thu Dec 10, 2020 1:57 am

Re: Anyone got lure working? Or some other Https thingy??

Post by Gunroar:Cannon() »

(Ahhh, jee, I messed up. Now I've got 2 similar topics.)

What's the difference between luasec and http I've been recommended. Can http module get the job done? Won't it give an error with URLs starting with https
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
User avatar
ivan
Party member
Posts: 1912
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Anyone got lure working? Or some other Https thingy??

Post by ivan »

Can http module get the job done?
You need https.dll to make SSL requests. Please read over the provided link for details.
Luasec is a generic Lua module whereas https.dll works better with Love2D
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests