[libsoup/carlosgc/request-body-stream: 3/3] message: remove soup_message_set_request




commit f2e4d1950a8423a554659c4b1f0eb39f96a44977
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Tue Oct 6 15:03:14 2020 +0200

    message: remove soup_message_set_request

 docs/reference/libsoup-3.0-sections.txt |  1 -
 libsoup/soup-message.c                  | 36 ---------------------------------
 libsoup/soup-message.h                  |  6 ------
 3 files changed, 43 deletions(-)
---
diff --git a/docs/reference/libsoup-3.0-sections.txt b/docs/reference/libsoup-3.0-sections.txt
index b31a5fb9..4b1d56ac 100644
--- a/docs/reference/libsoup-3.0-sections.txt
+++ b/docs/reference/libsoup-3.0-sections.txt
@@ -6,7 +6,6 @@ SoupMessage
 <SUBSECTION>
 soup_message_new
 soup_message_new_from_uri
-soup_message_set_request
 soup_message_set_request_body
 soup_message_set_request_body_from_bytes
 soup_message_set_response
diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c
index a9a55902..0d071513 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -1057,42 +1057,6 @@ soup_message_new_from_uri (const char *method, SoupURI *uri)
                             NULL);
 }
 
-/**
- * soup_message_set_request:
- * @msg: the message
- * @content_type: (allow-none): MIME Content-Type of the body
- * @req_use: a #SoupMemoryUse describing how to handle @req_body
- * @req_body: (allow-none) (array length=req_length) (element-type guint8):
- *   a data buffer containing the body of the message request.
- * @req_length: the byte length of @req_body.
- * 
- * Convenience function to set the request body of a #SoupMessage. If
- * @content_type is %NULL, the request body must be empty as well.
- */
-void
-soup_message_set_request (SoupMessage    *msg,
-                         const char     *content_type,
-                         SoupMemoryUse   req_use,
-                         const char     *req_body,
-                         gsize           req_length)
-{
-       g_return_if_fail (SOUP_IS_MESSAGE (msg));
-       g_return_if_fail (content_type != NULL || req_length == 0);
-
-       if (content_type) {
-               g_warn_if_fail (strchr (content_type, '/') != NULL);
-
-               soup_message_headers_replace (msg->request_headers,
-                                             "Content-Type", content_type);
-               soup_message_body_append (msg->request_body, req_use,
-                                         req_body, req_length);
-       } else {
-               soup_message_headers_remove (msg->request_headers,
-                                            "Content-Type");
-               soup_message_body_truncate (msg->request_body);
-       }
-}
-
 /**
  * soup_message_set_response:
  * @msg: the message
diff --git a/libsoup/soup-message.h b/libsoup/soup-message.h
index 91cd5f7d..35560bf9 100644
--- a/libsoup/soup-message.h
+++ b/libsoup/soup-message.h
@@ -90,12 +90,6 @@ SoupMessage   *soup_message_new_from_uri        (const char        *method,
                                                 SoupURI           *uri);
 
 SOUP_AVAILABLE_IN_2_4
-void           soup_message_set_request         (SoupMessage       *msg,
-                                                const char        *content_type,
-                                                SoupMemoryUse      req_use,
-                                                const char        *req_body,
-                                                gsize              req_length);
-SOUP_AVAILABLE_IN_2_4
 void           soup_message_set_response        (SoupMessage       *msg,
                                                 const char        *content_type,
                                                 SoupMemoryUse      resp_use,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]