luaworld-of-warcraft

wow Lua make http call


I am writing an addon to collect skinning drop items and mobs. it needs to collect information and send it to a server. I wonder if it's possible to send a request in wow addon or not and if yes guide me to any source. searching google didn't any help as most of the answer is for 2017 and before that and not sure if the wow's Shadow Land API still has those limitations.

I think it should be possible since I remember that I've seen some addons that do a new version check at the start of their load. but I couldn't find any code sample that shows me how to do it or how to do it.

any help is much appreciated.


Solution

  • You can't, at least not in WoW's Lua. You can only specify variable names (tables) in an addon .toc file which are saved to that addon's SavedVar file (same name as the addon) on logout/reload.

    An external program has to then read that file to send it (or data within) elsewhere. E.g. the Wowhead Client works like that.

    Addons that check their version is achieved by communicating with other players' installations of that addon, comparing version numbers.