How can I implement cURL into a mod?

User avatar
desvox
Member
 
Posts: 12
Joined: Sun May 03, 2015 13:34
GitHub: desvox
IRC: desvox
In-game: desvox

How can I implement cURL into a mod?

by desvox » Wed Dec 09, 2015 23:55

Hello there,

I can't seem to find any documentation or exisiting code on this, honestly I don't even know what to search for.

I've got a website that, when you call to a URL, it will return information. How can I get a mod to make a call to that URL and then process the information returned? Using cURL on my command line, I can see it plain as day, and could write a bash script to handle it....I just don't know how to get it to work in Minetest,

I hope this makes sense. Thanks!
I love your feedback and your suggestions!

Tox: E2602677725B4A2DA7B0395EFB9E03856CC5BBA948CFA9DB14ED6461EC39CC0F4859493BFD34
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: How can I implement cURL into a mod?

by rubenwardy » Wed Dec 09, 2015 23:58

You can't currently, as it's been rejected by the core devs because of "security concerns": https://github.com/minetest/minetest/pull/1869

Instead you'll have to do something like this: https://github.com/rubenwardy/minetest_ ... ua#L22-L32
and this: https://github.com/rubenwardy/minetest_ ... #L114-L123
 

User avatar
desvox
Member
 
Posts: 12
Joined: Sun May 03, 2015 13:34
GitHub: desvox
IRC: desvox
In-game: desvox

Re: How can I implement cURL into a mod?

by desvox » Thu Dec 10, 2015 00:12

Bummer bummer.....I can definitely see why though. Thanks for the info.
I love your feedback and your suggestions!

Tox: E2602677725B4A2DA7B0395EFB9E03856CC5BBA948CFA9DB14ED6461EC39CC0F4859493BFD34
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 5 guests

cron