views:

18

answers:

2

Hi, I am writing a client using libsoup APIs. I have 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?

A: 

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

Mahesh M
I changed it to gnu.org. I get the same return value. I am running ubuntu on vmware. Does it have to do with my network configuration?
Praveen S
A: 

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.

Praveen S