This is a list of APIs that have been removed:
- XML-RPC support.
- Handling of
data://URIs You should use
GFilefor the former and
soup_uri_decode_data_uri()for the latter.
- Define aliases for property names You must use the string name of properties directly which works in libsoup 2 already.
SoupSession:add-feature-by-typeYou must call
SoupRequest: You should use
SoupAddresshas been replaced with
SoupSockethas been removed.
SoupProxyResolverDefaultis replaced by
SoupBufferhas been replaced by
SoupDatehas been replaced by
SoupSession:ssl-stricthas been removed in favor of using the
soup_session_cancel_message()has been removed instead you pass a
GCancellableto APIs and call
SoupSession::authenticate signal has been replaced by
SoupMessage::authenticate. It now allows returning
TRUE to signify if
you will handle authentication which allows for asynchronous handling.
You can no longer directly access various structs such as
SoupMessage. These are
now accessed by getters and setters. See below for direct conversions:
|Struct field||Getter/Setter function|
|SoupMessage.response_body||See section on IO|
Similar struct changes exist for
SoupCookie but have very straightforward replacements.
SoupURI type has been replaced with the
GUri type which has
GUri is generally as simple as
SOUP_HTTP_URI_FLAGS, NULL). You may want to add
G_URI_FLAGS_PARSE_RELAXED to accept input that used to be considered valid.
Note that unlike
GUri is an immutable type so you cannot change the
contents of one after it has been constructed. We provide
soup_uri_copy() to aid
in modifying them.
The equivalent behavior to
soup_uri_to_string (uri, FALSE)
g_uri_to_string_partial (uri, G_URI_HIDE_PASSWORD).
GUri does not provide any function to check for equality
soup_uri_equal() still exists.
OPTIONS message with a path of
* is no longer a valid URI and has
been replaced with
SoupStatus was used to hold libsoup errors
SOUP_STATUS_IS_TRANSPORT_ERROR()). Now all of these errors are propagated up
through the normal
GError method on the various APIs to send
messages. Here is a mapping chart between the status codes and new errors:
|Old Status Codes||New
Previously there were ways to allow libsoup to read data into buffers and for
you to read from those buffers such as
libsoup no longer stores a buffer of data for you to read from and instead it
GInputStream which you read from using normal GIO APIs.
In libsoup 2 there was an attempt at making various APIs of the library thread-safe. However this was never well tested, maintained, or documented.
In libsoup 3 it now behaves in line with other GObject libraries. Once you
SoupSession all usage of that session must happen on the same
thread. You may create separate sessions per thread but in most use-cases you
should be using the async APIs which handle non-blocking IO for you.