From 9e88ec5151c9380eadb2e302d6f9a3a062a075ec Mon Sep 17 00:00:00 2001 From: Darshak Parikh Date: Sun, 6 Oct 2024 16:17:30 +0530 Subject: [PATCH] Port Inoreader plugin to Soup 3 --- plugins/backend/inoreader/InoReaderConnection.vala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/backend/inoreader/InoReaderConnection.vala b/plugins/backend/inoreader/InoReaderConnection.vala index 54a15b9d..2fcd50d7 100644 --- a/plugins/backend/inoreader/InoReaderConnection.vala +++ b/plugins/backend/inoreader/InoReaderConnection.vala @@ -39,7 +39,7 @@ public class FeedReader.InoReaderConnection { + "&client_secret=" + InoReaderSecret.apiClientSecret + "&scope=" + "&grant_type=authorization_code"; - message.set_request("application/x-www-form-urlencoded", Soup.MemoryUse.COPY, message_string.data); + message.set_request_body_from_bytes("application/x-www-form-urlencoded", new Bytes(message_string.data)); var response_body = m_session.send_and_read(message); if(message.status_code != 200) @@ -89,7 +89,7 @@ public class FeedReader.InoReaderConnection { + "&grant_type=refresh_token" + "&refresh_token=" + m_utils.getRefreshToken(); - message.set_request("application/x-www-form-urlencoded", Soup.MemoryUse.COPY, message_string.data); + message.set_request_body_from_bytes("application/x-www-form-urlencoded", new Bytes(message_string.data)); var response_body = m_session.send_and_read(message); if(message.status_code != 200) @@ -153,7 +153,7 @@ public class FeedReader.InoReaderConnection { if(message_string != null) { - message.set_request("application/x-www-form-urlencoded", Soup.MemoryUse.COPY, message_string.data); + message.set_request_body_from_bytes("application/x-www-form-urlencoded", new Bytes(message_string.data)); } var response_body = m_session.send_and_read(message); @@ -166,7 +166,7 @@ public class FeedReader.InoReaderConnection { return Response() { status = message.status_code, - data = (string)response_body.get_data().data + data = (string)response_body.get_data() }; }