1.4.2. The Client

The client finally may access the server via the HTTP protocol to store, retrieve and delete files. At the same time it might of course send XML-RPC requests.

  TcpIpConnection conn ("localhost", 32000); 1
  HttpProtocol prot(&conn);
  HttpClient client(&prot);

  string s = client.msgGET("/index.html"); 2
  client.msgPUT("hello put", "text/plain", "/putmsg.txt");  3
  client.doDELETE("/putmsg.txt");  4


Create a connection to localhost on port 32000.


Simulate a web browser and get an html file.


Store a string as a file on the server.


Delete a remote file.