# NAME
-CURLINFO_PROTOCOL - protocol used in the connection
+CURLINFO_PROTOCOL - URL scheme used in transfer
# SYNOPSIS
# DESCRIPTION
-This option is deprecated. We strongly recommend using
-CURLINFO_SCHEME(3) instead, because this option cannot return all
-possible protocols.
+This option is deprecated. We strongly recommend using CURLINFO_SCHEME(3)
+instead, because this option cannot return all possible schemes. The scheme
+might also sometimes be referred to as the protocol.
-Pass a pointer to a long to receive the version used in the last http
-connection. The returned value is set to one of these values:
+Pass a pointer to a long to receive the scheme used in the last transfer. The
+returned value is set to one of these values:
~~~c
CURLPROTO_DICT, CURLPROTO_FILE, CURLPROTO_FTP, CURLPROTO_FTPS,
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
res = curl_easy_perform(curl);
if(res == CURLE_OK) {
- long protocol;
- curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol);
+ long scheme;
+ curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &scheme);
}
curl_easy_cleanup(curl);
}
# DESCRIPTION
Pass a pointer to a char pointer to receive the pointer to a null-terminated
-string holding the URL scheme used for the most recent connection done with
-this CURL **handle**.
+string holding the URL scheme used for the most recent transfer done with this
+CURL **handle**. The scheme might also sometimes be referred to as the
+protocol.
The **scheme** pointer is NULL or points to private memory. You **must not**
free it. The memory gets freed automatically when you call