Closed ghost closed 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
hRequest.SetHeader("Content-Type", "application/json");
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'}."]}
{"_misc": ["Expected \"Content-Type\" header to be one of {'application/x-www-form-urlencoded', 'multipart/form-data', 'application/json'}."]}
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#L336if not discord response will be
{"_misc": ["Expected \"Content-Type\" header to be one of {'application/x-www-form-urlencoded', 'multipart/form-data', 'application/json'}."]}