NetSim 1.0.0
An educational network simulation software for students
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
NetSim::HTTP Class Reference

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.
 

Detailed Description

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.

Member Function Documentation

◆ initHTTPRequest()

void HTTP::initHTTPRequest ( const QString &  requestType,
const QString &  uri,
const QString &  version,
Package data 
)
static

Initializes an HTTP request header.

Parameters
requestTypeThe type of HTTP request (e.g., GET, POST).
uriThe URI being requested.
versionThe HTTP version (e.g., HTTP/1.1).
dataReference to the package where the header should be added.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initHTTPResponse()

void HTTP::initHTTPResponse ( const QString &  version,
quint16  messageCode,
const QString &  messageText,
Package data,
const QString &  htmlFile 
)
static

Initializes an HTTP response header.

Parameters
versionThe HTTP version (e.g., HTTP/1.1).
messageCodeThe HTTP status code (e.g., 200 for OK).
messageTextThe HTTP status message (e.g., "OK").
dataReference to the package where the header should be added.
htmlFileThe content of the HTML response.
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: