Hi!

In the new version of Vala (0.7.10) Soup.Message.response_body.data
returns uint8[] instead string, like in older versions. Is there any
standart way to convert this value to string?
I wrote this piece of code, but it is very ugly and slow, I think:

var session = new SessionAsync();
var message = new Message("GET", "http://meta.ua";);
session.send_message(message);

string result = "";
for(int i = 0; i < message.response_body.length; i++) {
        result += ((char)message.response_body.data[i]).to_string();
}

Hope for your suggestion.
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to