Http Class Reference

#include <http.h>

List of all members.

Public Member Functions

 Http (QString host, quint16 port=80)
bool request (QString path)
QString body ()

Private Attributes

QByteArray _response


Detailed Description

Definition at line 34 of file http.h.


Constructor & Destructor Documentation

Http::Http ( QString  host,
quint16  port = 80 
)

Constructor

Definition at line 33 of file http.cpp.


Member Function Documentation

bool Http::request ( QString  path  ) 

Requests the given file from the specified host.

Executes a single request for the given file. User input is blocked while the request is executing, so this should only be used for very small requests.

Parameters:
path the file to request.
Returns:
true if the request executed successfully.

Definition at line 44 of file http.cpp.

References _response.

QString Http::body (  ) 

Returns the body of the HTML response.

Returns the body of an HTTP response. If no body tags are present, then the whole response is returned.

Definition at line 61 of file http.cpp.

References _response.


Member Data Documentation

QByteArray Http::_response [private]

Contains the HTTP server's response after a successful request

Definition at line 49 of file http.h.

Referenced by body(), and request().


The documentation for this class was generated from the following files:
Generated on Wed Sep 5 15:49:29 2007 for Vidalia by  doxygen 1.5.3