summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/types.h4
-rw-r--r--include/urweb.h7
2 files changed, 11 insertions, 0 deletions
diff --git a/include/types.h b/include/types.h
index e5edab96..2adda753 100644
--- a/include/types.h
+++ b/include/types.h
@@ -40,6 +40,10 @@ typedef struct uw_Basis_file {
uw_Basis_blob data;
} uw_Basis_file;
+typedef struct uw_Basis_postBody {
+ uw_Basis_string type, data;
+} uw_Basis_postBody;
+
typedef enum { SUCCESS, FATAL, BOUNDED_RETRY, UNLIMITED_RETRY, RETURN_INDIRECTLY } failure_kind;
typedef enum { SERVED, KEEP_OPEN, FAILED } request_result;
diff --git a/include/urweb.h b/include/urweb.h
index 9527fac1..a0decd11 100644
--- a/include/urweb.h
+++ b/include/urweb.h
@@ -221,6 +221,13 @@ uw_Basis_blob uw_Basis_fileData(uw_context, uw_Basis_file);
uw_Basis_int uw_Basis_blobSize(uw_context, uw_Basis_blob);
uw_Basis_blob uw_Basis_textBlob(uw_context, uw_Basis_string);
+uw_Basis_string uw_Basis_postType(uw_context, uw_Basis_postBody);
+uw_Basis_string uw_Basis_postData(uw_context, uw_Basis_postBody);
+void uw_noPostBody(uw_context);
+void uw_postBody(uw_context, uw_Basis_postBody);
+int uw_hasPostBody(uw_context);
+uw_Basis_postBody uw_getPostBody(uw_context);
+
__attribute__((noreturn)) void uw_return_blob(uw_context, uw_Basis_blob, uw_Basis_string mimeType);
__attribute__((noreturn)) void uw_redirect(uw_context, uw_Basis_string url);