diff options
author | Debarshi Ray <debarshir@gnome.org> | 2017-02-06 15:42:49 +0100 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2017-02-06 15:43:19 +0100 |
commit | cdb623cac98509ce22d916ae9974fa6c3b21b7e6 (patch) | |
tree | 5e412cc0e614ec3c8227fb9dcb2d838c98c375a4 /gdata | |
parent | 79df1550f06454268751eb8e8de940208029d507 (diff) | |
download | libgdata-cdb623cac98509ce22d916ae9974fa6c3b21b7e6.tar.gz |
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
Diffstat (limited to 'gdata')
-rw-r--r-- | 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 d2719339..31585ff0 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 |