4 #ifndef BPSMDEREQUEST_H
5 #define BPSMDEREQUEST_H
Public include file for Bps class.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
BPS MDE request.
Definition: bpsmderequest.h:21
MimeType mimeType() const
BpsMdeRequest(QTcpSocket *aSocket, QObject *aParent=nullptr)
Constructor for the BpsMdeRequest objects.
Method
Request methods.
Definition: bpsmderequest.h:32
@ GET
Request a resource from server.
Definition: bpsmderequest.h:33
@ OPTIONS
Query options supported by server.
Definition: bpsmderequest.h:39
@ PUT
Upload a resource to server.
Definition: bpsmderequest.h:36
@ HEAD
Like GET, but no body data sent.
Definition: bpsmderequest.h:35
@ DELETE
Delete a resource from server.
Definition: bpsmderequest.h:37
@ POST
Send data to server.
Definition: bpsmderequest.h:34
@ TRACE
Loopback the request.
Definition: bpsmderequest.h:38
void sendReply()
Send the reply back to the client after setting the necessary status, text etc.
void setSessionId(qlonglong aSessionId)
Set a new session ID.
void setMustClose()
Force connection close after reply.
void redirect(const QString &aPath=QString())
A convenience function to make redirections on the current server.
Status
HTML status codes.
Definition: bpsmderequest.h:60
QTcpSocket * socket() const
QString methodAsText() const
void setData(const QByteArray &aData)
Put file contents to reply with in this.
qlonglong sessionId() const
MimeType
MIME types used by BPS MDE server.
Definition: bpsmderequest.h:46
@ M_gif
Graphics interchange format.
Definition: bpsmderequest.h:53
@ M_htc
HTML component.
Definition: bpsmderequest.h:50
@ M_png
Portable network graphics.
Definition: bpsmderequest.h:52
@ M_html
Hypertext markup.
Definition: bpsmderequest.h:47
@ M_js
Javascript.
Definition: bpsmderequest.h:49
@ M_css
Cascaded style sheet.
Definition: bpsmderequest.h:48
@ M_ico
Microsoft format icon.
Definition: bpsmderequest.h:51
static MimeType getMimeType(const QString &aPath)
Get the MIME type from a file name.
void setLocation(const QString &aLocation)
Set a redirection URL.
void setMaxAge(quint32 aSeconds)
Set the content cache seconds.
QVariantMap params() const
For GET/POST parameter names ending with [], the values are stored as QStringList and the [] is remov...
void setStatus(Status aStatus)
Set the status for the reply.
void setMimeType(MimeType aMimeType)
Set the MIME type for the reply.
static QString httpDate(const QDateTime &aUtcDateTime)
Format a UTC timestamp as HTTP date.