Page 1 of 1

How can I implement cURL into a mod?

PostPosted: Wed Dec 09, 2015 23:55
by desvox
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!

Re: How can I implement cURL into a mod?

PostPosted: Wed Dec 09, 2015 23:58
by rubenwardy
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

Re: How can I implement cURL into a mod?

PostPosted: Thu Dec 10, 2015 00:12
by desvox
Bummer bummer.....I can definitely see why though. Thanks for the info.