Skip to content

Commit

Permalink
Platform 8 upgrade: Port Inoreader plugin to Soup 3
Browse files Browse the repository at this point in the history
  • Loading branch information
dar5hak authored Oct 6, 2024
1 parent 6471bff commit 026a317
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/backend/inoreader/InoReaderConnection.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand All @@ -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()
};
}

Expand Down

0 comments on commit 026a317

Please sign in to comment.