开发者

Error while using libsoup

I am writing a client using libsoup APIs. I 开发者_如何学JAVAhave done the following.

session = soup_session_sync_new();

msg =  soup_message_new("GET","http://www.google.com"); 

status = soup_session_send_message(session,msg);`

However now i am getting the following error code in status. I print the reason phrase and it says the status= 4 , msg->reason_phrase = Cannot connect to destination

How do i resolve this issue?


The problem was i use a proxy server to connect to internet. Hence i needed to set the session object property of SOUP_SESSION_PROXY_URI with the proxy-sever:port value. It works fine now. Time to test POST method now.


The code seems perfectly alright. Just try changing google.com to some other simpler site, may be gnu.org, and retry the code.


Running the commands as sudo worked for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜