source: testjes/testwrequest.cpp

Last change on this file was 10, checked in by willem, 11 years ago

willem

File size: 677 bytes
Line 
1// vertalen met g++ -g -Wall testwrequest.cpp  -I../trunk ../trunk/wrequest.o ../trunk/wutils.o -lcurl
2#include <iostream>
3#include <wrequest.h>
4
5int main()
6{
7  std::cout << "start test ...\n";
8  wrequest w;
9  w.set_serverurl("http://localhost:5050/cgi-bin/pranv/");
10  w.set_protocol("1");
11  w.set_whoami("willem");
12  w.set_command("hopla");
13  w.set_value("   een //  ////value  ");
14
15  std::string body,header;
16  int rc;
17  rc = w.send_message(body,header);
18
19  std::cout << "rc:" << rc << std::endl;
20  std::cout << "header:" <<std::endl <<header << std::endl;
21  std::cout << "body:" <<std::endl <<body << std::endl;
22
23  std::cout << "all is well that ends well\n";
24  return 0;
25}
Note: See TracBrowser for help on using the repository browser.