[wxCURL]Why doesn't this piece of code work?

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
vanxining
Earned a small fee
Earned a small fee
Posts: 19
Joined: Sun Dec 20, 2009 2:22 am

[wxCURL]Why doesn't this piece of code work?

Post by vanxining »

Code: Select all

	wxString strURL( L"http://www.google.com/ncr" );

	wxCurlHTTP http( strURL );
	http.SetOpt(CURLOPT_AUTOREFERER, 1);
	http.SetOpt(CURLOPT_FOLLOWLOCATION, 1);

	char* buffer;
	http.Get(buffer);

	if( buffer )
		cout << buffer << endl;
It outputs nothing.(buffer is NULL)

Thanks!
Post Reply