CrazyHackGUT / Discord

Yet another Discord Library
GNU General Public License v3.0
11 stars 9 forks source link

Request Update Rest In Pawn v1.3.0 #13

Closed ghost closed 3 years ago

ghost commented 3 years ago

hello Kruzya, there is update from Rest In Pawn v1.3.0 Deprecated HTTPClient methodmap. would you update it?

thanks

ghost commented 3 years ago

and about this https://github.com/CrazyHackGUT/Discord/blob/master/addons/sourcemod/scripting/discord/Events.sp#L86 maybe it should be updated to discord.com?

CrazyHackGUT commented 3 years ago

I guess now it should be updated and ready for RiP v1.3.0. spcomp But requires a testing.

ghost commented 3 years ago

Thank you! I will test it on my server

ghost commented 3 years ago

running fine without any problem on my server

CrazyHackGUT commented 3 years ago

Then closed.

ghost commented 3 years ago

sorry @CrazyHackGUT, my bad. i found error that you need to add hRequest.SetHeader("Content-Type", "application/json"); on https://github.com/CrazyHackGUT/Discord/blob/master/addons/sourcemod/scripting/discord/UTIL.sp#L336

if not discord response will be {"_misc": ["Expected \"Content-Type\" header to be one of {'application/x-www-form-urlencoded', 'multipart/form-data', 'application/json'}."]}