Moved the HttpRequestData Structure from the WEBClient class to the WEBServer class
This commit is contained in:
parent
a95a387d30
commit
3bad569f21
@ -2,7 +2,7 @@
|
||||
|
||||
#define DEBUG_WEBCL
|
||||
|
||||
WEBClient::WEBClient(WiFiClient client, uint8_t id, uint16_t maxResourceBuffer, uint16_t maxBodyBuffer, uint16_t dataBufferSize) : TCPClient(client, id, dataBufferSize), _WEBClientState(WEBServer<WEBClient>::WEBClientState::ACCEPTED), _httpParserState(WEBServer<WEBClient>::HttpParserStatus::HTTP_VERB)
|
||||
WEBClient::WEBClient(WiFiClient client, uint8_t id, uint16_t maxResourceBuffer, uint16_t maxBodyBuffer, uint16_t dataBufferSize) : TCPClient(client, id, dataBufferSize), _WEBClientState(WEBServer<WEBClient>::WEBClientState::ACCEPTED), _httpParserState(WEBServer<WEBClient>::HttpParserStatus::HTTP_VERB), _fileSentBytes(0)
|
||||
{
|
||||
#ifdef DEBUG_WEBCL
|
||||
Serial.println("WEBClient : Standard constructor called");
|
||||
|
@ -15,25 +15,9 @@ class WEBClient : public TCPClient
|
||||
protected:
|
||||
WEBServer<WEBClient>::WEBClientState _WEBClientState;
|
||||
private:
|
||||
struct HttpRequestData
|
||||
{
|
||||
WEBServer<WEBClient>::HttpRequestMethod HRM;
|
||||
WEBServer<WEBClient>::HttpVersion HV;
|
||||
WEBServer<WEBClient>::HttpMIMEType HMT;
|
||||
|
||||
Dictionary<DictionaryHelper::StringEntity> getParams;
|
||||
char *getParamsDataPointer; //Used in the getParams algorithm
|
||||
Dictionary<DictionaryHelper::StringEntity> postParams;
|
||||
char *postParamsDataPointer; //Used in the postParams algorithm
|
||||
|
||||
char *httpResource;
|
||||
uint16_t maxResourceBuffer;
|
||||
char *httpBody;
|
||||
uint16_t maxBodyBuffer;
|
||||
} _httpRequestData;
|
||||
|
||||
WEBServer<WEBClient>::HttpRequestData _httpRequestData;
|
||||
WEBServer<WEBClient>::HttpParserStatus _httpParserState;
|
||||
|
||||
uint64_t _fileSentBytes;
|
||||
void clearHttpRequestData();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user