ESP32 HTTPS Server
httpsserver::HTTPMultipartBodyParser Class Reference
Inheritance diagram for httpsserver::HTTPMultipartBodyParser:
Collaboration diagram for httpsserver::HTTPMultipartBodyParser:

Public Member Functions

 HTTPMultipartBodyParser (HTTPRequest *req)
 
virtual bool nextField ()
 
virtual std::string getFieldName ()
 
virtual std::string getFieldFilename ()
 
virtual std::string getFieldMimeType ()
 
virtual bool endOfField ()
 
virtual size_t read (byte *buffer, size_t bufferSize)
 
- Public Member Functions inherited from httpsserver::HTTPBodyParser
 HTTPBodyParser (HTTPRequest *req)
 

Additional Inherited Members

- Public Attributes inherited from httpsserver::HTTPBodyParser
const size_t unknownLength = 0x7ffffffe
 
- Protected Attributes inherited from httpsserver::HTTPBodyParser
HTTPRequest_request
 

Member Function Documentation

◆ endOfField()

bool httpsserver::HTTPMultipartBodyParser::endOfField ( )
virtual

Returns true when all field data has been read

Implements httpsserver::HTTPBodyParser.

◆ getFieldFilename()

std::string httpsserver::HTTPMultipartBodyParser::getFieldFilename ( )
virtual

Returns the filename of the current field or an empty string

Implements httpsserver::HTTPBodyParser.

◆ getFieldMimeType()

std::string httpsserver::HTTPMultipartBodyParser::getFieldMimeType ( )
virtual

Returns the mime type of the current field.

Note: This value is set by the client. It can be altered maliciously. Do NOT rely on it for anything that affects the security of your device or other clients connected to it!

Not every BodyParser might provide this value, usually it's set to something like text/plain then

Implements httpsserver::HTTPBodyParser.

◆ getFieldName()

std::string httpsserver::HTTPMultipartBodyParser::getFieldName ( )
virtual

Returns the name of the current field

Implements httpsserver::HTTPBodyParser.

◆ nextField()

bool httpsserver::HTTPMultipartBodyParser::nextField ( )
virtual

Proceeds to the next field of the body

If a field has not been read completely, the remaining content is discarded.

Returns true iff proceeding to the next field succeeded (ie there was a next field)

Implements httpsserver::HTTPBodyParser.

◆ read()

size_t httpsserver::HTTPMultipartBodyParser::read ( byte *  buffer,
size_t  bufferSize 
)
virtual

Reads a maximum of bufferSize bytes into buffer and returns the actual amount of bytes that have been read

Implements httpsserver::HTTPBodyParser.


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