Dependents: Lab3Translator lab3_Radio_design Sync WeatherPlatform_20110408 ... more
HTTPText Class Reference
HTTP Client data container for text. More...
#include <HTTPText.h>
Inherits HTTPData, and HTTPData.
Public Member Functions | |
HTTPText (const string &encoding="text/html", int maxSize=DEFAULT_MAX_MEM_ALLOC) | |
Instantiates the object. | |
const char * | gets () const |
Gets text. | |
void | puts (const char *str) |
Sets the text in the container using a zero-terminated char*. | |
string & | get () |
Gets text. | |
void | set (const string &str) |
Puts text. | |
virtual void | clear () |
Clears the content. | |
HTTPText (const string &encoding="text/html", int maxSize=DEFAULT_MAX_MEM_ALLOC) | |
Instantiates the object. | |
const char * | gets () const |
Gets text. | |
void | puts (const char *str) |
Sets the text in the container using a zero-terminated char*. | |
string & | get () |
Gets text. | |
void | set (const string &str) |
Puts text. | |
virtual void | clear () |
Clears the content. | |
Friends | |
class | HTTPClient |
Detailed Description
HTTP Client data container for text.
This is a simple "Text" data repository for HTTP requests.
Definition at line 40 of file LPC1768/services/http/client/data/HTTPText.h.
Constructor & Destructor Documentation
HTTPText | ( | const string & | encoding = "text/html" , |
int | maxSize = DEFAULT_MAX_MEM_ALLOC |
||
) |
Instantiates the object.
- Parameters:
-
encoding encoding of the data, it defaults to text/html. maxSize defines the maximum memory size that can be allocated by the object. It defaults to 512 bytes.
HTTPText | ( | const string & | encoding = "text/html" , |
int | maxSize = DEFAULT_MAX_MEM_ALLOC |
||
) |
Instantiates the object.
- Parameters:
-
encoding encoding of the data, it defaults to text/html. maxSize defines the maximum memory size that can be allocated by the object. It defaults to 512 bytes.
Member Function Documentation
virtual void clear | ( | ) | [virtual] |
Clears the content.
If this container is used as a data sink, it is cleared by the HTTP Client at the beginning of the request.
virtual void clear | ( | ) | [virtual] |
Clears the content.
If this container is used as a data sink, it is cleared by the HTTP Client at the beginning of the request.
string& get | ( | ) |
Gets text.
Returns the text in the container as string.
string& get | ( | ) |
Gets text.
Returns the text in the container as string.
const char* gets | ( | ) | const |
Gets text.
Returns the text in the container as a zero-terminated char*. The array returned points to the internal buffer of the object and remains owned by the object.
const char* gets | ( | ) | const |
Gets text.
Returns the text in the container as a zero-terminated char*. The array returned points to the internal buffer of the object and remains owned by the object.
void puts | ( | const char * | str ) |
Sets the text in the container using a zero-terminated char*.
void puts | ( | const char * | str ) |
Sets the text in the container using a zero-terminated char*.
void set | ( | const string & | str ) |
Puts text.
Sets the text in the container as string.
void set | ( | const string & | str ) |
Puts text.
Sets the text in the container as string.
Generated on Fri Jul 15 2022 06:20:13 by 1.7.2