Reputation: 10393
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?
Upvotes: 1
Views: 700
Reputation: 10393
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.
Upvotes: 1
Reputation: 1229
The code seems perfectly alright. Just try changing google.com to some other simpler site, may be gnu.org, and retry the code.
Upvotes: 0