36 #include <FlowScanner.h>
46 FlowPattern statusCodePattern;
47 FlowPattern bodyBeginPattern;
53 void onReceive(uint16_t len,
const byte* data);
55 void onDNSResolve(uint8_t status, uint16_t identification,
const IPAddress& ip);
69 void request(
const String& hostName,
const String& resource, uint16_t port=80);
void request(const String &hostName, const String &resource, uint16_t port=80)
Starts a new HTTP request.
virtual void onResponseReceived()
Called immediately after the first line is received and there is a status code, e.g.
virtual void onBodyBegin()
Called when all HTTP headers have been received and the body of the response is about to arrive...
static const char bodyBeginPatternString[]
represents an IP address in memory
FlowScanner scanner
Internal FlowScanner instance used to detect header/response/status code, etc.
Implements the TCP protocol.
Provides an easy way to query a web server.
uint16_t statusCode
Contains the HTTP status code of the response.
virtual void onBodyReceived(uint16_t len, const byte *data)
Called once for each fragment of the body that is received.
virtual void onHeaderReceived(uint16_t len, const byte *data)
Called once for each fragment of the header portion of the response
virtual void onResponseEnd()
Called after all the body has been received
static const char statusCodePatternString[]