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

1

Create a connection to localhost on port 32000.

2

Simulate a web browser and get an html file.

3

Store a string as a file on the server.

4

Delete a remote file.