[libsoup/carlosgc/request-body-stream: 4/4] message: remove soup_message_set_request
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/carlosgc/request-body-stream: 4/4] message: remove soup_message_set_request
- Date: Thu, 8 Oct 2020 14:22:11 +0000 (UTC)
commit be7faf62034d818246910eee4455503fd6fcb99c
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 7053aa97..4cbef66b 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -1058,42 +1058,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]