Trouble using HTTP POST
- From: JeanLuc <jangernert gmail com>
- To: libsoup-list gnome org
- Subject: Trouble using HTTP POST
- Date: Wed, 20 Aug 2014 14:12:35 +0200
Hi there,
I am trying to log on to my tt-rss server using libsoup. Since version 1.5.3 it only supports HTTP POST to receive data.
Basically I only need to do something like this with libsoup:
But all the code examples written in vala using POST are outdated and don't compile anymore.
For example the last one on this page, Transmission RPC Interface:
Here is my code:
var session = new Soup.Session ();
var message = new Soup.Message ("POST", uri);
var login = "{\"op\":\"login\",\"user\":\"USER\",\"password\":\"PASSWORD\"}";
message.set_request("", MemoryUse.COPY, login);
session.send_message (message);
stdout.printf("%s \n", (string) message.response_body.flatten ().data);
I always get the error: "Argument 3: Cannot convert from `string' to `uint8[]'"
Thanks for any help in advance
best regards,
Jan
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]