#include <httpclnt.h>

Public Member Functions | |
| XMLRPCClient (LPCTSTR url, LPCTSTR agent="HTTP Post Client") | |
| void | enable_extensions (bool flag=true) |
| string | request_post (const string &in) |
| XMLRPCResult | call (LPCTSTR url, XMLRPCCall &call) |
Protected Attributes | |
| URL | _parsed_url |
| bool | _extensions |
| AddressList | _addr |
| HTTPConnection | _connection |
Definition at line 189 of file httpclnt.h.
Definition at line 42 of file httpclnt.cpp.
References _addr, URL::_hostname, _parsed_url, URL::_port, and AddressList::resolve().
: _extensions(false), _parsed_url(url), #ifdef USE_WININET _inet_lib(agent), _connection(_inet_lib._hinet, _parsed_url) #else _connection(agent, _parsed_url) #endif { // resolve the server and service name _addr.resolve(_parsed_url._hostname.c_str(), _parsed_url._port.c_str(), 0); }

| XMLRPCResult XMLRPCClient::call | ( | LPCTSTR | url, |
| XMLRPCCall & | call | ||
| ) |
Definition at line 79 of file xmlrpc_clnt.cpp.
References XMLRPCWriter::flush(), and request_post().
Referenced by client_test().
{
string xml_str = call.flush();
#ifdef _DEBUG
cout << xml_str << endl;
#endif
string out = request_post(xml_str);
#ifdef _DEBUG
cout << out << endl;
#endif
return XMLRPCResult(out);
}


| void XMLRPCClient::enable_extensions | ( | bool | flag = true ) |
[inline] |
| string XMLRPCClient::request_post | ( | const string & | in ) |
Definition at line 110 of file httpclnt.cpp.
References _addr, _connection, _extensions, _parsed_url, and HTTPConnection::send_request().
Referenced by call().
{
return _connection.send_request(_parsed_url, _addr, "POST", in.c_str(), in.length(), !_extensions);
}


AddressList XMLRPCClient::_addr [protected] |
Definition at line 213 of file httpclnt.h.
Referenced by request_post(), and XMLRPCClient().
HTTPConnection XMLRPCClient::_connection [protected] |
Definition at line 214 of file httpclnt.h.
Referenced by request_post().
bool XMLRPCClient::_extensions [protected] |
Definition at line 204 of file httpclnt.h.
Referenced by enable_extensions(), and request_post().
URL XMLRPCClient::_parsed_url [protected] |
Definition at line 203 of file httpclnt.h.
Referenced by request_post(), and XMLRPCClient().
1.7.2