From 86d45753be24fa3ff9e6f04d83ce60d812c86912 Mon Sep 17 00:00:00 2001 From: TBG Renfold Date: Wed, 11 Dec 2019 14:17:59 +0000 Subject: [PATCH] As discord have decided that url encoded form data was not good enough anymore, the scripts have been updated to use application/json instead. Thanks to EmilSuave in SecondLife for pointing out that this change had occurred. --- discord_embed_example.lsl | 2 +- discord_example.lsl | 2 +- discord_full_embed_example.lsl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/discord_embed_example.lsl b/discord_embed_example.lsl index 386cdf9..41c9639 100644 --- a/discord_embed_example.lsl +++ b/discord_embed_example.lsl @@ -42,7 +42,7 @@ key PostToDiscord(key AvatarID, string Message) return llHTTPRequest(WEBHOOK_URL + WEBHOOK_CHANNEL + "/" + WEBHOOK_TOKEN + query_string, [ HTTP_METHOD, "POST", - HTTP_MIMETYPE, "application/x-www-form-urlencoded", + HTTP_MIMETYPE, "application/json", HTTP_VERIFY_CERT,TRUE, HTTP_VERBOSE_THROTTLE, TRUE, HTTP_PRAGMA_NO_CACHE, TRUE ], llList2Json(JSON_OBJECT, json)); diff --git a/discord_example.lsl b/discord_example.lsl index 2bd1815..e987b9e 100644 --- a/discord_example.lsl +++ b/discord_example.lsl @@ -31,7 +31,7 @@ key PostToDiscord(key AvatarID, string Message) return llHTTPRequest(WEBHOOK_URL + WEBHOOK_CHANNEL + "/" + WEBHOOK_TOKEN + query_string, [ HTTP_METHOD, "POST", - HTTP_MIMETYPE, "application/x-www-form-urlencoded", + HTTP_MIMETYPE, "application/json", HTTP_VERIFY_CERT,TRUE, HTTP_VERBOSE_THROTTLE, TRUE, HTTP_PRAGMA_NO_CACHE, TRUE ], llList2Json(JSON_OBJECT, json)); diff --git a/discord_full_embed_example.lsl b/discord_full_embed_example.lsl index b76f8aa..8734988 100644 --- a/discord_full_embed_example.lsl +++ b/discord_full_embed_example.lsl @@ -52,7 +52,7 @@ key PostToDiscord(key AvatarID, string Message) return llHTTPRequest(WEBHOOK_URL + WEBHOOK_CHANNEL + "/" + WEBHOOK_TOKEN + query_string, [ HTTP_METHOD, "POST", - HTTP_MIMETYPE, "application/x-www-form-urlencoded", + HTTP_MIMETYPE, "application/json", HTTP_VERIFY_CERT,TRUE, HTTP_VERBOSE_THROTTLE, TRUE, HTTP_PRAGMA_NO_CACHE, TRUE ], llList2Json(JSON_OBJECT, json));