arduino-audio-tools
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HttpRequestHeader Class Reference

Reading and writing of Http Requests. More...

#include <HttpHeader.h>

Inheritance diagram for HttpRequestHeader:
HttpHeader

Public Member Functions

HttpHeaderclear ()
 clears the data
 
const char * get (const char *key)
 
bool isChunked ()
 
bool isRedirectStatus ()
 returns true if the status code is >=300 and < 400
 
bool isValidStatus ()
 returns true if status code >=200 and < 300
 
MethodID method ()
 
void parse1stLine (const char *line)
 
const char * protocol ()
 Provide the protocol.
 
HttpHeaderput (const char *key, const char *value)
 
HttpHeaderput (const char *key, int value)
 adds a new line to the header - e.g. for content size
 
HttpHeaderput (const char *line)
 adds a received new line to the header
 
bool read (Client &in)
 reads the full header from the request (stream)
 
int readLine (Client &in, char *str, int len)
 
void setAutoCreateLines (bool is_auto_line)
 automatically create new lines
 
void setProcessed ()
 
void setProtocol (const char *protocal)
 Defines the protocol: e.g. HTTP/1.1.
 
void setTimeout (int timeoutMs)
 Set the timout.
 
HttpHeadersetValues (MethodID id, const char *urlPath, const char *protocol=nullptr)
 
int statusCode ()
 
const char * statusMessage ()
 
const char * urlPath ()
 
void write (Client &out)
 writes the full header to the indicated HttpStreamedMultiOutput stream
 
void write1stLine (Client &out)
 
void writeHeaderLine (Client &out, HttpHeaderLine &header)
 

Static Public Member Functions

static void end ()
 release static temp buffer
 

Protected Member Functions

void crlf (Client &out)
 
MethodID getMethod (const char *line)
 
HttpHeaderLineheaderLine (const char *key)
 
char * tempBuffer ()
 

Protected Attributes

bool create_new_lines = true
 
const char * CRLF = "\r\n"
 
bool is_chunked = false
 
bool is_written = false
 
List< HttpHeaderLine * > lines
 
MethodID method_id
 
Str protocol_str {10}
 
HttpLineReader reader
 
int status_code = UNDEFINED
 
Str status_msg {20}
 
int timeout_ms = URL_CLIENT_TIMEOUT
 
Str url_path {70}
 

Detailed Description

Reading and writing of Http Requests.

Author
Phil Schatzmann

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