1
.\" You can view this file with:
3
.\" $Id: curl_easy_getinfo.3,v 1.1 2002/03/04 10:09:49 bagder Exp $
5
.TH curl_easy_init 3 "31 Jan 2001" "libcurl 7.9.4" "libcurl Manual"
7
curl_easy_getinfo - Extract information from a curl session (added in 7.4)
9
.B #include <curl/curl.h>
11
.BI "CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );"
14
Request internal information from the curl session with this function. The
17
be a pointer to a long, a pointer to a char * or a pointer to a double (as
18
this documentation describes further down). The data pointed-to will be
19
filled in accordingly and can be relied upon only if the function returns
20
CURLE_OK. This function is intended to get used *AFTER* a performed transfer,
21
all results from this function are undefined until the transfer is completed.
22
.SH AVAILABLE INFORMATION
23
These are informations that can be extracted:
25
.B CURLINFO_EFFECTIVE_URL
26
Pass a pointer to a 'char *' to receive the last used effective URL.
29
Pass a pointer to a long to receive the last received HTTP code.
32
Pass a pointer to a long to receive the remote time of the retrieved
33
document. If you get -1, it can be because of many reasons (unknown, the
34
server hides it or the server doesn't support the command that tells document
35
time etc) and the time of the document is unknown. Note that you must tell the
36
server to collect this information before the transfer is made, by using the
37
CURLOPT_FILETIME option to \fIcurl_easy_setopt(3)\fP. (Added in 7.5)
39
.B CURLINFO_TOTAL_TIME
40
Pass a pointer to a double to receive the total transaction time in seconds
41
for the previous transfer.
43
.B CURLINFO_NAMELOOKUP_TIME
44
Pass a pointer to a double to receive the time, in seconds, it took from the
45
start until the name resolving was completed.
47
.B CURLINFO_CONNECT_TIME
48
Pass a pointer to a double to receive the time, in seconds, it took from the
49
start until the connect to the remote host (or proxy) was completed.
51
.B CURLINFO_PRETRANSFER_TIME
52
Pass a pointer to a double to receive the time, in seconds, it took from the
53
start until the file transfer is just about to begin. This includes all
54
pre-transfer commands and negotiations that are specific to the particular
57
.B CURLINFO_STARTTRANSFER_TIME
58
Pass a pointer to a double to receive the time, in seconds, it took from the
59
start until the first byte is just about to be transfered. This includes
60
CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate
63
.B CURLINFO_SIZE_UPLOAD
64
Pass a pointer to a double to receive the total amount of bytes that were
67
.B CURLINFO_SIZE_DOWNLOAD
68
Pass a pointer to a double to receive the total amount of bytes that were
71
.B CURLINFO_SPEED_DOWNLOAD
72
Pass a pointer to a double to receive the average download speed that curl
73
measured for the complete download.
75
.B CURLINFO_SPEED_UPLOAD
76
Pass a pointer to a double to receive the average upload speed that curl
77
measured for the complete upload.
79
.B CURLINFO_HEADER_SIZE
80
Pass a pointer to a long to receive the total size of all the headers
83
.B CURLINFO_REQUEST_SIZE
84
Pass a pointer to a long to receive the total size of the issued
85
requests. This is so far only for HTTP requests. Note that this may be more
86
than one request if FOLLOWLOCATION is true.
88
.B CURLINFO_SSL_VERIFYRESULT
89
Pass a pointer to a long to receive the result of the certification
90
verification that was requested (using the CURLOPT_SSL_VERIFYPEER option to
91
curl_easy_setopt). (Added in 7.4.2)
93
.B CURLINFO_CONTENT_LENGTH_DOWNLOAD
94
Pass a pointer to a double to receive the content-length of the download. This
95
is the value read from the Content-Length: field. (Added in 7.6.1)
97
.B CURLINFO_CONTENT_LENGTH_UPLOAD
98
Pass a pointer to a double to receive the specified size of the upload.
101
.B CURLINFO_CONTENT_TYPE
102
Pass a pointer to a 'char *' to receive the content-type of the downloaded
103
object. This is the value read from the Content-Type: field. If you get NULL,
104
it means that the server didn't send a valid Content-Type header or that the
105
protocol used doesn't support this. (Added in 7.9.4)
109
If the operation was successful, CURLE_OK is returned. Otherwise an
110
appropriate error code will be returned.
112
.BR curl_easy_setopt "(3)"
114
Surely there are some, you tell me!