CD track Fire Burning DVD hot Jay-Z best avi Angels & Demons

 
 
Home Examples example 00 The most simple example
example 00 The most simple example PDF Print E-mail
User Rating: / 27
PoorBest 
 
/**
* \file
* The most simple example.
* 
*/
 
#include <curlpp/curlpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>
 
 
using namespace curlpp::options;
 
int main(int, char **)
{
  try
  {
    // That's all that is needed to do cleanup of used resources (RAII style).
    curlpp::Cleanup myCleanup;
 
    // Our request to be sent.
    curlpp::Easy myRequest;
 
    // Set the URL.
    myRequest.setOpt<Url>("http://example.com");
 
    // Send request and get a result.
    // By default the result goes to standard output.
    myRequest.perform();
  }
 
  catch(curlpp::RuntimeError & e)
  {
    std::cout << e.what() << std::endl;
  }
 
  catch(curlpp::LogicError & e)
  {
    std::cout << e.what() << std::endl;
  }
 
  return 0;
}
 
 
Last Updated on Friday, 06 March 2009 14:30
 
Banner
Copyright © 2010 cURLpp. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.