A simple web service over HTTP library. Calls a HTTP server via GET, and returns the response wrapped in a XML parser. All calls are synchronous. Needs the NetServicesMin, DNSResolver, TcpLineStream and spxml libraries. The code for URL handling has been copied directly from the original NetServices library (Thanks to Donatien!).
WebService Class Reference
A simple web service over HTTP library. More...
#include <webservice.h>
Public Member Functions | |
WebService (const char *urlStr) | |
create the web service instance. | |
SP_XmlDomParser * | callService () |
Execute the web service call. | |
~WebService () | |
close all resources | |
void | close () |
close all resources |
Detailed Description
A simple web service over HTTP library.
Calls a HTTP server via GET, and returns the response wrapped in a XML parser. All calls are synchronous. Needs the NetServicesMin and DNSResolver library The code for URL handling has been copied directly from the original NetServices library (Thanks to Donatien!).
Definition at line 39 of file webservice.h.
Constructor & Destructor Documentation
WebService | ( | const char * | urlStr ) |
create the web service instance.
urlStr the URL to call via GET
Definition at line 31 of file webservice.cpp.
~WebService | ( | ) |
close all resources
Definition at line 55 of file webservice.h.
Member Function Documentation
SP_XmlDomParser * callService | ( | ) |
Execute the web service call.
Note that the caller is responsible for freeing the return parser instance.
- Returns:
- the XML parser, or NULL if an error occured
Definition at line 44 of file webservice.cpp.
void close | ( | ) |
close all resources
Definition at line 77 of file webservice.cpp.
Generated on Wed Jul 13 2022 10:40:59 by 1.7.2