The class for creating URI queries.
More...
#include "nn/nlib/Uri.h"
|
| UriQueryEncoder () noexcept |
| Instantiates the object with default parameters (default constructor).
|
|
errno_t | Append (const char *key, const char *value) noexcept |
| Encodes a provided pair of a key and value and appends it to the query string. More...
|
|
const char * | c_str () const noexcept |
| Returns the encoded query string.
|
|
| operator const char * () const noexcept |
| Returns the encoded query string.
|
|
std::pair< const char *, const char * > | GetData () const noexcept |
| Returns the beginning and end of the encoded query string.
|
|
template<size_t N = 1024>
class nn::nlib::UriQueryEncoder< N >
The class for creating URI queries.
- Template Parameters
-
N | The size of the buffer to store the encoded query string. |
- Description
- Receives a string containing a key and value and encodes it into a query string. The query string can be also set by passing the encoded string to the
Uri::SetQuery()
function. The size of the internal buffer can be specified using the template parameter.
- Examples:
- misc/uri/uri.cpp.
Definition at line 32 of file Uri.h.
◆ Append()
Encodes a provided pair of a key and value and appends it to the query string.
- Parameters
-
[in] | key | Query string key. |
[in] | value | Query string value. |
- Return values
-
0 | Success. |
ERANGE | Insufficient buffer size. |
- Description
- If
NULL
is passed to the argument, it is assumed that an empty key and/or an empty value has been set. If not successful, the query string stays in the state that has been maintained until this function was executed.
Definition at line 320 of file Uri.h.
The documentation for this class was generated from the following files: