diff options
author | Dan Winship <danw@gnome.org> | 2011-12-05 16:00:40 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2012-12-10 17:14:57 +0100 |
commit | e00cf242322f82f0800956b17d726f0437db683a (patch) | |
tree | 9b0339e1bc6a52e42800af158a8760a6602f6f7e /tests/proxy-test.c | |
parent | 6863c37db17db41ec027d3b17f0b9d5d0be96c72 (diff) | |
download | libsoup-e00cf242322f82f0800956b17d726f0437db683a.tar.gz |
Move SoupRequester API into SoupSession, declare SoupRequest stable
Add soup_session_request() and soup_session_request_uri(),
implementing basically the same behavior as soup_requester_request()
and soup_requester_request_uri() (but without requiring a separate
SoupSessionFeature), and remove the unstable-api ifdefs from
soup-request*.h.
SoupRequester still exists, but it is still guarded by the
unstable-api ifdefs, and is just a dummy wrapper around the
functionality that is now in SoupSession.
Diffstat (limited to 'tests/proxy-test.c')
-rw-r--r-- | tests/proxy-test.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/proxy-test.c b/tests/proxy-test.c index 94e548a8..048acfa7 100644 --- a/tests/proxy-test.c +++ b/tests/proxy-test.c @@ -132,7 +132,6 @@ test_url_new_api (const char *url, int proxy, guint expected, SoupSession *session; SoupURI *proxy_uri; SoupMessage *msg; - SoupRequester *requester; SoupRequest *request; GInputStream *stream; GError *error = NULL; @@ -140,7 +139,7 @@ test_url_new_api (const char *url, int proxy, guint expected, if (!tls_available && g_str_has_prefix (url, "https:")) return; - debug_printf (1, " GET (requester API) %s via %s%s\n", url, proxy_names[proxy], + debug_printf (1, " GET (request API) %s via %s%s\n", url, proxy_names[proxy], close ? " (with Connection: close)" : ""); if (proxy == UNAUTH_PROXY && expected != SOUP_STATUS_FORBIDDEN) expected = SOUP_STATUS_PROXY_UNAUTHORIZED; @@ -150,7 +149,6 @@ test_url_new_api (const char *url, int proxy, guint expected, */ proxy_uri = soup_uri_new (proxies[proxy]); session = soup_test_session_new (sync ? SOUP_TYPE_SESSION_SYNC : SOUP_TYPE_SESSION_ASYNC, - SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_REQUESTER, SOUP_SESSION_USE_THREAD_CONTEXT, TRUE, SOUP_SESSION_PROXY_URI, proxy_uri, NULL); @@ -163,8 +161,7 @@ test_url_new_api (const char *url, int proxy, guint expected, G_CALLBACK (set_close_on_connect), NULL); } - requester = (SoupRequester *)soup_session_get_feature (session, SOUP_TYPE_REQUESTER); - request = soup_requester_request (requester, url, NULL); + request = soup_session_request (session, url, NULL); msg = soup_request_http_get_message (SOUP_REQUEST_HTTP (request)); stream = soup_test_request_send (request, NULL, &error); |