ESP32 HTTPS Server
HTTPBodyParser.hpp
1 #ifndef SRC_HTTPBODYPARSER_HPP_
2 #define SRC_HTTPBODYPARSER_HPP_
3 
4 #include <Arduino.h>
5 #include <string>
6 #include "HTTPRequest.hpp"
7 
8 namespace httpsserver {
9 
21 public:
22  const size_t unknownLength = 0x7ffffffe;
23 
24  HTTPBodyParser(HTTPRequest * req): _request(req) {};
25  virtual ~HTTPBodyParser() {}
26 
34  virtual bool nextField() = 0;
35 
37  virtual std::string getFieldName() = 0;
38 
40  virtual std::string getFieldFilename() = 0;
41 
50  virtual std::string getFieldMimeType() = 0;
51 
55  virtual size_t read(byte* buffer, size_t bufferSize) = 0;
56 
58  virtual bool endOfField() = 0;
59 
60 
61 protected:
64 };
65 
66 } // namespace httpserver
67 
68 #endif
virtual bool nextField()=0
Represents the request stream for an HTTP request.
Definition: HTTPRequest.hpp:22
HTTPRequest * _request
Definition: HTTPBodyParser.hpp:63
virtual size_t read(byte *buffer, size_t bufferSize)=0
Definition: HTTPBodyParser.hpp:20
virtual std::string getFieldFilename()=0
virtual std::string getFieldName()=0
virtual bool endOfField()=0
virtual std::string getFieldMimeType()=0
Definition: ConnectionContext.cpp:3