@@ -55,6 +55,7 @@ enum chunk_state {
};
struct _GWebResult {
+ int err;
guint16 status;
const guint8 *buffer;
gsize length;
@@ -2462,6 +2463,14 @@ bool g_web_cancel_request(GWeb *web, guint id)
return true;
}
+int g_web_result_get_err(const GWebResult *result)
+{
+ if (!result)
+ return -EINVAL;
+
+ return result->err;
+}
+
guint16 g_web_result_get_status(GWebResult *result)
{
if (!result)
@@ -162,6 +162,7 @@ guint g_web_request_post_file(GWeb *web, const char *url,
bool g_web_cancel_request(GWeb *web, guint id);
+int g_web_result_get_err(const GWebResult *result);
guint16 g_web_result_get_status(GWebResult *result);
bool g_web_result_get_header(GWebResult *result,