diff options
Diffstat (limited to 'src/include/taler_curl_lib.h')
-rw-r--r-- | src/include/taler_curl_lib.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/include/taler_curl_lib.h b/src/include/taler_curl_lib.h index 42d7f9d1f..f108e6158 100644 --- a/src/include/taler_curl_lib.h +++ b/src/include/taler_curl_lib.h @@ -47,6 +47,11 @@ struct TALER_CURL_PostContext * Custom headers. */ struct curl_slist *headers; + + /** + * Set to true to disable compression of the body. + */ + bool disable_compression; }; @@ -59,7 +64,7 @@ struct TALER_CURL_PostContext * @param body JSON body to add to @e ctx * @return #GNUNET_OK on success #GNUNET_SYSERR on failure */ -int +enum GNUNET_GenericReturnValue TALER_curl_easy_post (struct TALER_CURL_PostContext *ctx, CURL *eh, const json_t *body); @@ -74,4 +79,17 @@ void TALER_curl_easy_post_finished (struct TALER_CURL_PostContext *ctx); +/** + * Set a secure redirection policy, allowing a limited + * number of redirects and only going from HTTP to HTTPS + * but not from HTTPS to HTTP. + * + * @param[in,out] eh easy handle to modify + * @param url URL to base the redirect policy on; + * must start with "http://" or "https://" + */ +void +TALER_curl_set_secure_redirect_policy (CURL *eh, + const char *url); + #endif |