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.
Dependents: mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510
HTTPText Class Reference
A data endpoint to store text. More...
#include <HTTPText.h>
Inherits IHTTPDataIn, IHTTPDataOut, IHTTPDataIn, and IHTTPDataOut.
Public Member Functions | |
HTTPText (char *str) | |
Create an HTTPText instance for output. | |
HTTPText (char *str, size_t size) | |
Create an HTTPText instance for input. | |
HTTPText (char *str) | |
Create an HTTPText instance for output. | |
HTTPText (char *str, size_t size) | |
Create an HTTPText instance for input. | |
Protected Member Functions | |
virtual void | readReset () |
Reset stream to its beginning Called by the HTTPClient on each new request. | |
virtual int | read (char *buf, size_t len, size_t *pReadLen) |
Read a piece of data to be transmitted. | |
virtual int | getDataType (char *type, size_t maxTypeLen) |
Get MIME type. | |
virtual bool | getIsChunked () |
Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header. | |
virtual size_t | getDataLen () |
If the data is not chunked, get its size Used for Content-Length header. | |
virtual void | writeReset () |
Reset stream to its beginning Called by the HTTPClient on each new request. | |
virtual int | write (const char *buf, size_t len) |
Write a piece of data transmitted by the server. | |
virtual void | setDataType (const char *type) |
Set MIME type. | |
virtual void | setIsChunked (bool chunked) |
Determine whether the data is chunked Recovered from Transfer-Encoding header. | |
virtual void | setDataLen (size_t len) |
If the data is not chunked, set its size From Content-Length header. | |
virtual int | read (char *buf, size_t len, size_t *pReadLen) |
Read a piece of data to be transmitted. | |
virtual int | getDataType (char *type, size_t maxTypeLen) |
Get MIME type. | |
virtual bool | getIsChunked () |
Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header. | |
virtual size_t | getDataLen () |
If the data is not chunked, get its size Used for Content-Length header. | |
virtual int | write (const char *buf, size_t len) |
Write a piece of data transmitted by the server. | |
virtual void | setDataType (const char *type) |
Set MIME type. | |
virtual void | setIsChunked (bool chunked) |
Determine whether the data is chunked Recovered from Transfer-Encoding header. | |
virtual void | setDataLen (size_t len) |
If the data is not chunked, set its size From Content-Length header. | |
Friends | |
class | HTTPClient |
class | HTTPClient |
Detailed Description
A data endpoint to store text.
Definition at line 28 of file cellular/http/common/HTTPClient/data/HTTPText.h.
Constructor & Destructor Documentation
HTTPText | ( | char * | str ) |
Create an HTTPText instance for output.
- Parameters:
-
str String to be transmitted
Definition at line 32 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
HTTPText | ( | char * | str, |
size_t | size | ||
) |
Create an HTTPText instance for input.
- Parameters:
-
str Buffer to store the incoming string size Size of the buffer
Definition at line 37 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
HTTPText | ( | char * | str ) |
Create an HTTPText instance for output.
- Parameters:
-
str String to be transmitted
HTTPText | ( | char * | str, |
size_t | size | ||
) |
Create an HTTPText instance for input.
- Parameters:
-
str Buffer to store the incoming string size Size of the buffer
Member Function Documentation
size_t getDataLen | ( | ) | [protected, virtual] |
If the data is not chunked, get its size Used for Content-Length header.
Implements IHTTPDataOut.
Definition at line 68 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
virtual size_t getDataLen | ( | ) | [protected, virtual] |
If the data is not chunked, get its size Used for Content-Length header.
Implements IHTTPDataOut.
int getDataType | ( | char * | type, |
size_t | maxTypeLen | ||
) | [protected, virtual] |
Get MIME type.
- Parameters:
-
type Internet media type from Content-Type header
Implements IHTTPDataOut.
Definition at line 56 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
virtual int getDataType | ( | char * | type, |
size_t | maxTypeLen | ||
) | [protected, virtual] |
Get MIME type.
- Parameters:
-
type Internet media type from Content-Type header
Implements IHTTPDataOut.
bool getIsChunked | ( | ) | [protected, virtual] |
Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header.
Implements IHTTPDataOut.
Definition at line 63 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
virtual bool getIsChunked | ( | ) | [protected, virtual] |
Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header.
Implements IHTTPDataOut.
virtual int read | ( | char * | buf, |
size_t | len, | ||
size_t * | pReadLen | ||
) | [protected, virtual] |
Read a piece of data to be transmitted.
- Parameters:
-
buf Pointer to the buffer on which to copy the data len Length of the buffer pReadLen Pointer to the variable on which the actual copied data length will be stored
Implements IHTTPDataOut.
int read | ( | char * | buf, |
size_t | len, | ||
size_t * | pReadLen | ||
) | [protected, virtual] |
Read a piece of data to be transmitted.
- Parameters:
-
buf Pointer to the buffer on which to copy the data len Length of the buffer pReadLen Pointer to the variable on which the actual copied data length will be stored
Implements IHTTPDataOut.
Definition at line 48 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
void readReset | ( | ) | [protected, virtual] |
Reset stream to its beginning Called by the HTTPClient on each new request.
Implements IHTTPDataOut.
Definition at line 43 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
virtual void setDataLen | ( | size_t | len ) | [protected, virtual] |
If the data is not chunked, set its size From Content-Length header.
Implements IHTTPDataIn.
void setDataLen | ( | size_t | len ) | [protected, virtual] |
If the data is not chunked, set its size From Content-Length header.
Implements IHTTPDataIn.
Definition at line 98 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
void setDataType | ( | const char * | type ) | [protected, virtual] |
Set MIME type.
- Parameters:
-
type Internet media type from Content-Type header
Implements IHTTPDataIn.
Definition at line 88 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
virtual void setDataType | ( | const char * | type ) | [protected, virtual] |
virtual void setIsChunked | ( | bool | chunked ) | [protected, virtual] |
Determine whether the data is chunked Recovered from Transfer-Encoding header.
Implements IHTTPDataIn.
void setIsChunked | ( | bool | chunked ) | [protected, virtual] |
Determine whether the data is chunked Recovered from Transfer-Encoding header.
Implements IHTTPDataIn.
Definition at line 93 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
int write | ( | const char * | buf, |
size_t | len | ||
) | [protected, virtual] |
Write a piece of data transmitted by the server.
- Parameters:
-
buf Pointer to the buffer from which to copy the data len Length of the buffer
Implements IHTTPDataIn.
Definition at line 79 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
virtual int write | ( | const char * | buf, |
size_t | len | ||
) | [protected, virtual] |
Write a piece of data transmitted by the server.
- Parameters:
-
buf Pointer to the buffer from which to copy the data len Length of the buffer
Implements IHTTPDataIn.
void writeReset | ( | ) | [protected, virtual] |
Reset stream to its beginning Called by the HTTPClient on each new request.
Implements IHTTPDataIn.
Definition at line 74 of file cellular/http/common/HTTPClient/data/HTTPText.cpp.
Generated on Tue Jul 12 2022 11:03:18 by
