util_status_to_string


Description:

public static unowned string util_status_to_string (uint status_code, string? reason_phrase)

Returns the reason_phrase, if it's non-%NULL and non-empty, a static string corresponding to status_code.

In case neither that can be found a localized "Unknown error" message is returned.

Parameters:

status_code

an HTTP status code

reason_phrase

preferred string to use for the message, or null

Returns:

Error text based on given arguments. The returned value is valid as long as reason_phrase is not freed.