[libgdata] app: Specify the correct content type
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] app: Specify the correct content type
- Date: Wed, 8 Feb 2017 16:47:34 +0000 (UTC)
commit cdb623cac98509ce22d916ae9974fa6c3b21b7e6
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Feb 6 15:42:49 2017 +0100
app: Specify the correct content type
GDataAPPCategories supports only JSON ever since the YouTube API was
ported to v3.
https://bugzilla.gnome.org/show_bug.cgi?id=777980
gdata/app/gdata-app-categories.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gdata/app/gdata-app-categories.c b/gdata/app/gdata-app-categories.c
index d271933..31585ff 100644
--- a/gdata/app/gdata-app-categories.c
+++ b/gdata/app/gdata-app-categories.c
@@ -45,6 +45,8 @@ parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data,
GError **error);
static gboolean
post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error);
+static const gchar *
+get_content_type (void);
struct _GDataAPPCategoriesPrivate {
GList *categories;
@@ -72,6 +74,7 @@ gdata_app_categories_class_init (GDataAPPCategoriesClass *klass)
parsable_class->parse_json = parse_json;
parsable_class->post_parse_json = post_parse_json;
+ parsable_class->get_content_type = get_content_type;
parsable_class->element_name = "categories";
parsable_class->element_namespace = "app";
@@ -214,6 +217,12 @@ post_parse_json (GDataParsable *parsable, gpointer user_data, GError **error)
return TRUE;
}
+static const gchar *
+get_content_type (void)
+{
+ return "application/json";
+}
+
/**
* gdata_app_categories_get_categories:
* @self: a #GDataAPPCategories
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]