Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NTPClient_NetServices mbed
HTTPText Class Reference
HTTP Client data container for text. More...
#include <HTTPText.h>
Inherits 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. | |
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 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.
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.
| 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.
| 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.
Generated on Tue Jul 12 2022 21:32:20 by
1.7.2