Message


Object Hierarchy:

Soup.Message Soup.Message Soup.Message GLib.Object GLib.Object GLib.Object->Soup.Message

Description:

[ CCode ( type_id = "soup_message_get_type ()" ) ]
public sealed class Message : Object

Represents an HTTP message being sent or received.

A Message represents an HTTP message that is being sent or received.

You would create a Message with [[email protected]] or [[email protected]_from_uri], set up its fields appropriately, and send it.

[property@Message:status-code] will normally be a [enum@Status] value, eg, soup_status_ok, though of course it might actually be an unknown status code. [property@Message:reason-phrase] is the actual text returned from the server, which may or may not correspond to the "standard" description of status_code. At any rate, it is almost certainly not localized, and not very descriptive even if it is in the user's language; you should not use [property@Message:reason-phrase] in user-visible messages. Rather, you should look at [property@Message:status-code], and determine an end-user-appropriate message based on that and on what you were trying to do.

Note that libsoup's terminology here does not quite match the HTTP specification: in RFC 2616, an "HTTP-message" is *either* a Request, *or* a Response. In libsoup, a Message combines both the request and the response.


Namespace: Soup
Package: libsoup-3.0

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from class GLib.Object



2022 vala-language.org