URL-related coding / encoding functionality.
|
| virtual std::string | decodeURLComponent (const char *value) const =0 |
| | Decodes URL component.
|
| virtual std::string | decodeURLComponent (const char *value, size_t length) const =0 |
| | Decodes URL component.
|
| virtual std::string | decodeURLComponent (const std::string &value) const =0 |
| | Decodes URL component.
|
| virtual std::string | encodeFormItem (const std::string &value) const =0 |
| | Encodes a form item (name or value) for using in application/x-www-form-urlencoded payloads.
|
| virtual std::string | encodeURLComponent (const std::string &value) const =0 |
| | Encodes URL component.
|
| virtual std::string | encodeURLPath (const std::string &value) const =0 |
| | Encodes an entire unencoded URL path.
|
| virtual std::string | encodeURLQuery (const std::vector< std::pair< std::string, std::string > > &queryParameters) const =0 |
| | Encodes URL query.
|
| virtual std::string | toRequestTarget (const ::tenduke::net::URL &url) const =0 |
| | Returns "request target", i.e., string representation, which is used in an HTTP request message in the request-line (when using the origin-form).
|
| virtual std::string | toString (const ::tenduke::net::URL &url) const =0 |
| | Converts the URL to string, URL encoded.
|
| virtual std::string tenduke::net::URLCodec::encodeURLPath |
( |
const std::string & | value | ) |
const |
|
pure virtual |
Encodes an entire unencoded URL path.
/ separates the path segments and is not encoded. In the segments, all characters except unreserved characters (https://www.rfc-editor.org/rfc/rfc3986#section-2.3) are percent-encoded. A path segment cannot contain slashes.
For example "/graph/Profile[id='abc']/~ManyToOne/Person would be encoded to /graph/Profile%5Bid%3D%27abc%27%5D/~ManyToOne/Person.
- Parameters
-
- Returns
- URL-encoded representation of the path
Implemented in AbstractURLCodec, and tenduke::net::AbstractURLCodec.