Aurorus Posted December 5, 2020 Share Posted December 5, 2020 Hey, im working on api to get DST server info and send it to discord bot, is there way to access api via DST mod? Link to comment https://forums.kleientertainment.com/forums/topic/124460-can-i-access-rest-api-via-dont-starve-mod/ Share on other sites More sharing options...
Cunning fox Posted December 5, 2020 Share Posted December 5, 2020 (edited) You mean send a request from the game? Yes, it's TheSim:QueryServer Edited December 5, 2020 by Cunning fox Link to comment https://forums.kleientertainment.com/forums/topic/124460-can-i-access-rest-api-via-dont-starve-mod/#findComment-1401402 Share on other sites More sharing options...
Aurorus Posted December 5, 2020 Author Share Posted December 5, 2020 Can i use it to post, put or delete, or only get? Link to comment https://forums.kleientertainment.com/forums/topic/124460-can-i-access-rest-api-via-dont-starve-mod/#findComment-1401471 Share on other sites More sharing options...
Aurorus Posted December 6, 2020 Author Share Posted December 6, 2020 16 hours ago, Cunning fox said: You mean send a request from the game? Yes, it's TheSim:QueryServer Can you write example of POST usage? i have tried TheSim:QueryServer( "http://localhost:3000/api/lobby/post/param/param/param/param/param/param/param/param/param", function(json, isSuccess, code) if(isSuccess) then print(json) print(code) end end, "POST" ) but its executing GET method Link to comment https://forums.kleientertainment.com/forums/topic/124460-can-i-access-rest-api-via-dont-starve-mod/#findComment-1401759 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now