C++ Web Framework  3.0
Public Member Functions | Static Public Member Functions | List of all members
HttpCookie Class Reference

This class represents a HTTP Cookie. More...

#include <httpcookie.h>

Public Member Functions

 HttpCookie ()=default
 This is the cookie's default constructor.
 
 HttpCookie (const QByteArray &source)
 
 HttpCookie (const QByteArray &name, const QByteArray &value)
 This is an overloaded constructor that receives a cookie's name and value. More...
 
QByteArray toByteArray () const
 
void setName (const QByteArray &value) noexcept
 setName
 
void setValue (const QByteArray &value) noexcept
 setValue
 
void setComment (const QByteArray &value) noexcept
 setComment
 
void setDomain (const QByteArray &value) noexcept
 setDomain
 
void setMaxAge (int value) noexcept
 setMaxAge
 
void setPath (const QByteArray &value) noexcept
 setPath
 
void setSecure (bool value) noexcept
 setSecure
 
QByteArray getName () const noexcept
 getName
 
QByteArray getValue () const noexcept
 getValue
 
QByteArray getComment () const noexcept
 getComment
 
QByteArray getDomain () const noexcept
 getDomain
 
int getMaxAge () const noexcept
 getMaxAge
 
QByteArray getPath () const noexcept
 getPath
 
bool getSecure () const noexcept
 getSecure
 
int getVersion () const noexcept
 getVersion
 

Static Public Member Functions

static QList< QByteArray > splitCSV (const QByteArray &source)
 splitCSV More...
 

Detailed Description

This class represents a HTTP Cookie.

Constructor & Destructor Documentation

◆ HttpCookie() [1/2]

CWF_BEGIN_NAMESPACE HttpCookie::HttpCookie ( const QByteArray &  source)
explicit

Create a cookie from a string.

Parameters
sourceString as received in a HTTP Cookie2 header.

◆ HttpCookie() [2/2]

HttpCookie::HttpCookie ( const QByteArray &  name,
const QByteArray &  value 
)

This is an overloaded constructor that receives a cookie's name and value.

Parameters
name: This is a reference to a QByteArray. It will change the cookie's name.
value: This is a reference to a QByteArray. It will change the cookie's value.

Member Function Documentation

◆ splitCSV()

QList< QByteArray > HttpCookie::splitCSV ( const QByteArray &  source)
static

splitCSV

Parameters
source
Returns

◆ toByteArray()

QByteArray HttpCookie::toByteArray ( ) const

Convert this cookie to a string that may be used in a Set-Cookie header.


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