Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
librest
Commits
2ce301ca
Commit
2ce301ca
authored
Aug 13, 2010
by
Ross Burton
Browse files
Add rest_proxy_call_get_payload_as_xml
parent
1e97f492
Changes
2
Hide whitespace changes
Inline
Side-by-side
rest/rest-proxy-call.c
View file @
2ce301ca
...
...
@@ -1220,3 +1220,25 @@ rest_proxy_call_get_status_message (RestProxyCall *call)
return
priv
->
status_message
;
}
RestXmlNode
*
rest_proxy_call_get_payload_as_xml
(
RestProxyCall
*
call
)
{
RestProxyCallPrivate
*
priv
;
static
RestXmlParser
*
parser
=
NULL
;
RestXmlNode
*
root
;
g_return_val_if_fail
(
REST_IS_PROXY_CALL
(
call
),
NULL
);
priv
=
GET_PRIVATE
(
call
);
if
(
parser
==
NULL
)
parser
=
rest_xml_parser_new
();
root
=
rest_xml_parser_parse_from_data_full
(
parser
,
priv
->
payload
,
priv
->
length
,
priv
->
url
,
g_hash_table_lookup
(
priv
->
content_params
,
"charset"
));
return
root
;
}
rest/rest-proxy-call.h
View file @
2ce301ca
...
...
@@ -25,6 +25,7 @@
#include
<glib-object.h>
#include
<rest/rest-params.h>
#include
<rest/rest-xml-parser.h>
G_BEGIN_DECLS
...
...
@@ -185,6 +186,8 @@ const gchar *rest_proxy_call_get_payload (RestProxyCall *call);
guint
rest_proxy_call_get_status_code
(
RestProxyCall
*
call
);
const
gchar
*
rest_proxy_call_get_status_message
(
RestProxyCall
*
call
);
RestXmlNode
*
rest_proxy_call_get_payload_as_xml
(
RestProxyCall
*
call
);
G_END_DECLS
#endif
/* _REST_PROXY_CALL */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment