CrazyHackGUT / Discord

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

Add Content-Type #14

Closed ghost closed 3 years ago

ghost commented 3 years ago

sorry about #13, 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'}."]}