|
10Duke Enterprise C++ Client
|
#include <URLCodec.h>
URL-related coding / encoding functionality.
Public Member Functions | |
| 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 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. | |
|
pure virtual |
Decodes URL component.
| value | - |
Implemented in tenduke::net::SimpleURLService.
|
pure virtual |
Decodes URL component.
| value | - |
| length | - |
Implemented in tenduke::net::SimpleURLService.
|
pure virtual |
Decodes URL component.
| value | - |
Implemented in tenduke::net::SimpleURLService.
|
pure virtual |
Encodes a form item (name or value) for using in application/x-www-form-urlencoded payloads.
Uses rules from https://url.spec.whatwg.org/#application-x-www-form-urlencoded-percent-encode-set .
| value | the item (name or value) to encode |
Implemented in AbstractURLCodec, and tenduke::net::AbstractURLCodec.
|
pure virtual |
Encodes URL component.
| value | - |
Implemented in tenduke::net::SimpleURLService.
|
pure virtual |
Encodes an entire URL path.
Uses rules from https://www.rfc-editor.org/rfc/rfc3986#section-3.3 to encode the path components. Path component cannot contain slashes.
For example ‘"/graph/Profile[id='abc’]/~ManyToOne/Personwould be encoded to /graph/Profile%5Bid=%27abc%27%5D/~ManyToOne/Person`.
| value | the path to encode |
Implemented in AbstractURLCodec, and tenduke::net::AbstractURLCodec.
|
pure virtual |
Encodes URL query.
| queryParameters | - |
Implemented in AbstractURLCodec, and tenduke::net::AbstractURLCodec.
|
pure virtual |
Returns "request target", i.e., string representation, which is used in an HTTP request message in the request-line (when using the origin-form).
See https://www.rfc-editor.org/rfc/rfc7230#section-3.1
| url | The URL |
|
pure virtual |
Converts the URL to string, URL encoded.
| url | URL to convert to string |
Implemented in AbstractURLCodec, and tenduke::net::AbstractURLCodec.