================================================================================ Documentation of classes that access web-services on behalf of CodeSnip. ================================================================================ DelphiDabbler Standard Web Service -------------------------------------------------------------------------------- A DelphiDabbler Standard Web Service object has the following attributes: It provides the correct user agent string. Web services return HTTP error 403 if the user agent is not as expected. User agents can also specify the version of the web service to be used. It submits data to the using HTTP Post. Information is POSTed to the web service either in the form of URL encoded query strings or as raw post data. Which format is used depends on web service. Web services respond with text data. The text is encoded as the default for the server which is taken to be ISO-8859-1 (Latin 1). The response text is split into lines by CRLF pairs. There is always at least one line. Any trailing CRLFs should be stripped from the text. The first line always contains a status code. A zero code indicates success, while non-zero codes indicate an error. The meaning of the error code is specific to the web service. Consult the documentation for the service for details. A successful response usually, but not always includes further information starting from the second line of the text. The meaning of this text depends on the web service. Consult the documentation for the service for details. An error response should include an error message starting from the second line of the text. Error messages often take up just a single line, but may have more than one line. The response format, after trimming, in ABNF is: response = status_code CRLF data status_code = success_code / error_code success_code = "0" error_code = ["-"] 1*DIGIT data = data_line [CRLF data] data_line = 0*[VCHAR | WSP] The class TDDabStdWebService provides core functionality for working with standard web services. In particular it: * Provides methods for posting data in the form of query strings to the web service. * Handles the response, checking the status code. When an error code is received an exception is raised using the error message from the response. In the case of a successful response the status code line is stripped and the remaining data made available for processing by descendant classes. Class heirachy -------------------------------------------------------------------------------- TBaseWebService | +-- TDDabStdWebService | +-- TCodeSubmitter | +-- TDownloadMgr | +-- TMailListSubscriber | +-- TRegistrar -------------------------------------------------------------------------------- $Rev$ $Date$ --------------------------------------------------------------------------------