From e0c6e60f74e3102737c9058e87e14f2c99d76969 Mon Sep 17 00:00:00 2001 From: Jaclyn Brockschmidt Date: Wed, 30 Dec 2020 01:30:21 -0800 Subject: [PATCH] Use HTTPS instead of HTTP for API calls Using HTTP yields a 405 error. For instance, when attempting to paste a file ``` api = PastebinPython(api_dev_key=API_DEV_KEY) api.createPasteFromFile(FILE_NAME) ``` We get the following error ``` pastebin_python.pastebin_exceptions.PastebinFileException: HTTP Error 405: Method Not Allowed ``` Using HTTPS instead fixes this. --- pastebin_python/pastebin_constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pastebin_python/pastebin_constants.py b/pastebin_python/pastebin_constants.py index afdc34d..b47e511 100644 --- a/pastebin_python/pastebin_constants.py +++ b/pastebin_python/pastebin_constants.py @@ -5,7 +5,7 @@ .. moduleauthor:: Ferdinand Silva """ -PASTEBIN_URL = "http://pastebin.com/" #: The pastebin.com base url +PASTEBIN_URL = "https://pastebin.com/" #: The pastebin.com base url PASTEBIN_RAW_URL = "%s%s" % (PASTEBIN_URL, "raw.php?i=%s") PASTEBIN_API_URL = "%s%s" % (PASTEBIN_URL, "api/") #: The pastebin.com API base URL PASTEBIN_API_POST_URL = "%s%s" % (PASTEBIN_API_URL, "api_post.php") #: The pastebin.com API POST URL @@ -19,4 +19,4 @@ EXPIRE_10_MIN = "10M" #: EXPIRE_1_HOUR = "1H" #: EXPIRE_1_DAY = "1D" #: -EXPIRE_1_MONTH = "1M" #: \ No newline at end of file +EXPIRE_1_MONTH = "1M" #: