Change-Id: I1d01c95d6418646ef9d2f8f4b07210a33b10c117
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
return !strncasecmp(actual, value, strcspn(actual, "; "));
}
+long curl_wrap_response_code_get(CURL *curl)
+{
+ long rc;
+ CURLcode code;
+
+ code = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &rc);
+ return (code == CURLE_OK) ? rc : 0;
+}
+
CURL *curl_wrap_prepare_get_url(const char *url)
{
CURL *curl;
extern int curl_wrap_content_type_is (CURL * curl, const char *value);
+extern long curl_wrap_response_code_get(CURL *curl);
+
extern CURL *curl_wrap_prepare_get_url(const char *url);
extern CURL *curl_wrap_prepare_get(const char *base, const char *path, const char * const *args);