SoupMessage

Represents an HTTP message being sent or received.

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

You would create a #SoupMessage with soup.message.Message.new_ or soup.message.Message.newFromUri, set up its fields appropriately, and send it.

property@Message:status-code will normally be a enum@Status value, eg, soup.types.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 #SoupMessage combines both the request and the response.

struct SoupMessage