Experimental Network Services API.
More...
|
namespace | UrlEvent |
| Contains the message constants that are sent by the various protocols.
|
|
namespace | UrlEventData |
| Contains the names of the data in the messages that are sent by the various protocols.
|
|
|
enum class | BHttpStatusClass : int16 |
| Category of the HTTP response status code.
|
|
enum class | BHttpStatusCode : int16 |
| Enumeration of standardized HTTP status codes.
|
|
enum class | BHttpTimeFormat : int8 |
| Describes the three time formats supported by the HTTP RFC.
|
|
Experimental Network Services API.
See Experimental Network Services Support for more information.
◆ encode_to_base64()
Utility function that encodes a string to base64 and returns the result.
- Since
- Haiku R1
◆ format_http_time()
BString BPrivate::Network::format_http_time |
( |
BDateTime |
timestamp, |
|
|
BHttpTimeFormat |
outputFormat = BHttpTimeFormat::RFC1123 |
|
) |
| |
Format the timestamp into a string according to the outputFormat.
See the description of the module in HttpTime.h for more information about HTTP timestamps.
- Parameters
-
timestamp | A valid BDateTime object for the desired timestamp. |
outputFormat | The requested outputformat. The default is the recommended RFC 1123 format. |
- Returns
- A string that contains the formatted timestamp.
- Exceptions
-
BHttpTime::InvalidInput | The date does not contain a valid timestamp. |
std::bad_alloc | In the future this method may throw this exception when the memory for the output string cannot be allocated. |
- See also
- BHttpTime parse_http_time()
- Since
- Haiku R1
◆ parse_http_time()
BDateTime BPrivate::Network::parse_http_time |
( |
const BString & |
string | ) |
|
Parse a string that contains a timestamp and return a BDateTime object.
See the description of the module in HttpTime.h for more information about HTTP timestamps.
- Parameters
-
string | A string that contains a valid HTTP timestamp. The dateString must not contain any characters, other than the timestamp. It is up to the caller to sanitize any input, including trimming whitespace at the beginning and end of the string. |
- Exceptions
-
- See also
- BHttpTime format_http_time()
- Since
- Haiku R1