|
arduino-audio-tools
|
In a http request and reply we need to process header information. With this API we can define and query the header information. The individual header lines are stored in a vector. This is the common functionality for the HttpRequest and HttpReplyHeader subclasses. More...
#include <HttpHeader.h>
Public Member Functions | |
| HttpHeader & | clear () |
| clears the data | |
| void | end () |
| release static temp buffer | |
| const char * | get (const char *key) |
| List< HttpHeaderLine * > & | getHeaderLines () |
| Provides the http parameter lines. | |
| 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 () |
| const char * | protocol () |
| Provide the protocol. | |
| HttpHeader & | put (const char *key, const char *value) |
| HttpHeader & | put (const char *key, int value) |
| adds a new line to the header - e.g. for content size | |
| HttpHeader & | put (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 | resize (int bufferSize) |
| Resizes the internal read buffer. | |
| 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. | |
| int | statusCode () |
| const char * | statusMessage () |
| const char * | urlPath () |
| void | write (Client &out) |
| writes the full header to the indicated HttpStreamedMultiOutput stream | |
| void | writeHeaderLine (Client &out, HttpHeaderLine &header) |
Protected Member Functions | |
| void | crlf (Client &out) |
| MethodID | getMethod (const char *line) |
| HttpHeaderLine * | headerLine (const char *key) |
| virtual void | parse1stLine (const char *line)=0 |
| char * | tempBuffer () |
| virtual void | write1stLine (Client &out)=0 |
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} |
| Vector< char > | temp_buffer {HTTP_MAX_LEN} |
| int | timeout_ms = URL_CLIENT_TIMEOUT |
| Str | url_path {70} |
In a http request and reply we need to process header information. With this API we can define and query the header information. The individual header lines are stored in a vector. This is the common functionality for the HttpRequest and HttpReplyHeader subclasses.