NetSim 1.0.0
An educational network simulation software for students
|
A static class that provides methods to handle HTTP requests and responses. More...
#include <http.h>
Static Public Member Functions | |
static void | initHTTPRequest (const QString &requestType, const QString &uri, const QString &version, Package &data) |
Initializes an HTTP request header. | |
static void | initHTTPResponse (const QString &version, quint16 messageCode, const QString &messageText, Package &data, const QString &htmlFile) |
Initializes an HTTP response header. | |
A static class that provides methods to handle HTTP requests and responses.
The HTTP class contains static methods that can initialize HTTP request and response headers. These methods can be utilized to easily create and manipulate HTTP-related data within packages.
|
static |
Initializes an HTTP request header.
requestType | The type of HTTP request (e.g., GET, POST). |
uri | The URI being requested. |
version | The HTTP version (e.g., HTTP/1.1). |
data | Reference to the package where the header should be added. |
|
static |
Initializes an HTTP response header.
version | The HTTP version (e.g., HTTP/1.1). |
messageCode | The HTTP status code (e.g., 200 for OK). |
messageText | The HTTP status message (e.g., "OK"). |
data | Reference to the package where the header should be added. |
htmlFile | The content of the HTML response. |