Class Message

java.lang.Object
All Implemented Interfaces:
Proxy

@Generated("io.github.jwharm.JavaGI") public final class Message extends GObject
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 Message(java.lang.String, java.lang.String) or fromUri(java.lang.String, org.gnome.glib.Uri), set up its fields appropriately, and send it.

Message:status-code will normally be a Status value, eg, Status.OK, though of course it might actually be an unknown status code. Message:reason-phrase is the actual text returned from the server, which may or may not correspond to the "standard" description of statusCode. 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 Message:reason-phrase in user-visible messages. Rather, you should look at 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.