1curl_easy_getinfo(3)            libcurl Manual            curl_easy_getinfo(3)
2
3
4

NAME

6       curl_easy_getinfo - extract information from a curl handle
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );
12
13

DESCRIPTION

15       Request  internal information from the curl session with this function.
16       The third argument MUST be a pointer to a long, a pointer to a char  *,
17       a  pointer  to  a struct curl_slist * or a pointer to a double (as this
18       documentation describes further down).  The  data  pointed-to  will  be
19       filled  in  accordingly  and  can  be  relied upon only if the function
20       returns CURLE_OK.  Use this function AFTER a performed transfer if  you
21       want to get transfer related data.
22
23       You  should  not free the memory returned by this function unless it is
24       explicitly mentioned below.
25

AVAILABLE INFORMATION

27       The following information can be extracted:
28
29       CURLINFO_EFFECTIVE_URL
30              Last used URL.  See CURLINFO_EFFECTIVE_URL(3)
31
32       CURLINFO_RESPONSE_CODE
33              Last received response code.  See CURLINFO_RESPONSE_CODE(3)
34
35       CURLINFO_HTTP_CONNECTCODE
36              Last proxy CONNECT response  code.   See  CURLINFO_HTTP_CONNECT‐
37              CODE(3)
38
39       CURLINFO_HTTP_VERSION
40              The http version used in the connection.  See CURLINFO_HTTP_VER‐
41              SION(3)
42
43       CURLINFO_FILETIME
44              Remote time of the retrieved document. See CURLINFO_FILETIME(3)
45
46       CURLINFO_FILETIME_T
47              Remote  time  of  the  retrieved  document.  See  CURLINFO_FILE‐
48              TIME_T(3)
49
50       CURLINFO_TOTAL_TIME
51              Total time of previous transfer.  See CURLINFO_TOTAL_TIME(3)
52
53       CURLINFO_TOTAL_TIME_T
54              Total time of previous transfer.  See CURLINFO_TOTAL_TIME_T(3)
55
56       CURLINFO_NAMELOOKUP_TIME
57              Time   from   start   until   name   resolving  completed.   See
58              CURLINFO_NAMELOOKUP_TIME(3)
59
60       CURLINFO_NAMELOOKUP_TIME_T
61              Time  from  start   until   name   resolving   completed.    See
62              CURLINFO_NAMELOOKUP_TIME_T(3)
63
64       CURLINFO_CONNECT_TIME
65              Time  from  start  until  remote  host  or proxy completed.  See
66              CURLINFO_CONNECT_TIME(3)
67
68       CURLINFO_CONNECT_TIME_T
69              Time from start until  remote  host  or  proxy  completed.   See
70              CURLINFO_CONNECT_TIME_T(3)
71
72       CURLINFO_APPCONNECT_TIME
73              Time   from   start  until  SSL/SSH  handshake  completed.   See
74              CURLINFO_APPCONNECT_TIME(3)
75
76       CURLINFO_APPCONNECT_TIME_T
77              Time  from  start  until  SSL/SSH  handshake   completed.    See
78              CURLINFO_APPCONNECT_TIME_T(3)
79
80       CURLINFO_PRETRANSFER_TIME
81              Time  from  start  until  just  before the transfer begins.  See
82              CURLINFO_PRETRANSFER_TIME(3)
83
84       CURLINFO_PRETRANSFER_TIME_T
85              Time from start until just  before  the  transfer  begins.   See
86              CURLINFO_PRETRANSFER_TIME_T(3)
87
88       CURLINFO_STARTTRANSFER_TIME
89              Time from start until just when the first byte is received.  See
90              CURLINFO_STARTTRANSFER_TIME(3)
91
92       CURLINFO_STARTTRANSFER_TIME_T
93              Time from start until just when the first byte is received.  See
94              CURLINFO_STARTTRANSFER_TIME_T(3)
95
96       CURLINFO_REDIRECT_TIME
97              Time  taken  for  all  redirect steps before the final transfer.
98              See CURLINFO_REDIRECT_TIME(3)
99
100       CURLINFO_REDIRECT_TIME_T
101              Time taken for all redirect steps  before  the  final  transfer.
102              See CURLINFO_REDIRECT_TIME_T(3)
103
104       CURLINFO_REDIRECT_COUNT
105              Total  number of redirects that were followed.  See CURLINFO_RE‐
106              DIRECT_COUNT(3)
107
108       CURLINFO_REDIRECT_URL
109              URL a redirect would take you to,  had  you  enabled  redirects.
110              See CURLINFO_REDIRECT_URL(3)
111
112       CURLINFO_SIZE_UPLOAD
113              (Deprecated)      Number     of     bytes     uploaded.      See
114              CURLINFO_SIZE_UPLOAD(3)
115
116       CURLINFO_SIZE_UPLOAD_T
117              Number of bytes uploaded.  See CURLINFO_SIZE_UPLOAD_T(3)
118
119       CURLINFO_SIZE_DOWNLOAD
120              (Deprecated)    Number     of     bytes     downloaded.      See
121              CURLINFO_SIZE_DOWNLOAD(3)
122
123       CURLINFO_SIZE_DOWNLOAD_T
124              Number of bytes downloaded.  See CURLINFO_SIZE_DOWNLOAD_T(3)
125
126       CURLINFO_SPEED_DOWNLOAD
127              (Deprecated)  Average  download speed.  See CURLINFO_SPEED_DOWN‐
128              LOAD(3)
129
130       CURLINFO_SPEED_DOWNLOAD_T
131              Average download speed.  See CURLINFO_SPEED_DOWNLOAD_T(3)
132
133       CURLINFO_SPEED_UPLOAD
134              (Deprecated) Average upload speed.  See CURLINFO_SPEED_UPLOAD(3)
135
136       CURLINFO_SPEED_UPLOAD_T
137              Average upload speed.  See CURLINFO_SPEED_UPLOAD_T(3)
138
139       CURLINFO_HEADER_SIZE
140              Number   of   bytes    of    all    headers    received.     See
141              CURLINFO_HEADER_SIZE(3)
142
143       CURLINFO_REQUEST_SIZE
144              Number   of  bytes  sent  in  the  issued  HTTP  requests.   See
145              CURLINFO_REQUEST_SIZE(3)
146
147       CURLINFO_SSL_VERIFYRESULT
148              Certificate  verification  result.   See  CURLINFO_SSL_VERIFYRE‐
149              SULT(3)
150
151       CURLINFO_PROXY_SSL_VERIFYRESULT
152              Proxy       certificate      verification      result.       See
153              CURLINFO_PROXY_SSL_VERIFYRESULT(3)
154
155       CURLINFO_SSL_ENGINES
156              A list of OpenSSL crypto engines.  See CURLINFO_SSL_ENGINES(3)
157
158       CURLINFO_CONTENT_LENGTH_DOWNLOAD
159              (Deprecated) Content length from the Content-Length header.  See
160              CURLINFO_CONTENT_LENGTH_DOWNLOAD(3)
161
162       CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
163              Content    length   from   the   Content-Length   header.    See
164              CURLINFO_CONTENT_LENGTH_DOWNLOAD_T(3)
165
166       CURLINFO_CONTENT_LENGTH_UPLOAD
167              (Deprecated) Upload size. See CURLINFO_CONTENT_LENGTH_UPLOAD(3)
168
169       CURLINFO_CONTENT_LENGTH_UPLOAD_T
170              Upload size.  See CURLINFO_CONTENT_LENGTH_UPLOAD_T(3)
171
172       CURLINFO_CONTENT_TYPE
173              Content type from the Content-Type  header.   See  CURLINFO_CON‐
174              TENT_TYPE(3)
175
176       CURLINFO_PRIVATE
177              User's private data pointer.  See CURLINFO_PRIVATE(3)
178
179       CURLINFO_HTTPAUTH_AVAIL
180              Available       HTTP      authentication      methods.       See
181              CURLINFO_HTTPAUTH_AVAIL(3)
182
183       CURLINFO_PROXYAUTH_AVAIL
184              Available HTTP proxy authentication methods.  See CURLINFO_PROX‐
185              YAUTH_AVAIL(3)
186
187       CURLINFO_OS_ERRNO
188              The   errno   from   the   last   failure   to   connect.    See
189              CURLINFO_OS_ERRNO(3)
190
191       CURLINFO_NUM_CONNECTS
192              Number of new successful connections used for previous transfer.
193              See CURLINFO_NUM_CONNECTS(3)
194
195       CURLINFO_PRIMARY_IP
196              IP address of the last connection.  See CURLINFO_PRIMARY_IP(3)
197
198       CURLINFO_PRIMARY_PORT
199              Port of the last connection.  See CURLINFO_PRIMARY_PORT(3)
200
201       CURLINFO_LOCAL_IP
202              Local-end     IP    address    of    last    connection.     See
203              CURLINFO_LOCAL_IP(3)
204
205       CURLINFO_LOCAL_PORT
206              Local-end port of last connection.  See CURLINFO_LOCAL_PORT(3)
207
208       CURLINFO_COOKIELIST
209              List of all known cookies.  See CURLINFO_COOKIELIST(3)
210
211       CURLINFO_LASTSOCKET
212              Last socket used.  See CURLINFO_LASTSOCKET(3)
213
214       CURLINFO_ACTIVESOCKET
215              The session's active socket.  See CURLINFO_ACTIVESOCKET(3)
216
217       CURLINFO_FTP_ENTRY_PATH
218              The  entry  path  after  logging  in  to  an  FTP  server.   See
219              CURLINFO_FTP_ENTRY_PATH(3)
220
221       CURLINFO_CERTINFO
222              Certificate chain.  See CURLINFO_CERTINFO(3)
223
224       CURLINFO_TLS_SSL_PTR
225              TLS  session  info that can be used for further processing.  See
226              CURLINFO_TLS_SSL_PTR(3)
227
228       CURLINFO_TLS_SESSION
229              TLS session info that can be used for further  processing.   See
230              CURLINFO_TLS_SESSION(3).       Deprecated       option,      use
231              CURLINFO_TLS_SSL_PTR(3) instead!
232
233       CURLINFO_CONDITION_UNMET
234              Whether or not a time conditional was met.  See  CURLINFO_CONDI‐
235              TION_UNMET(3)
236
237       CURLINFO_RTSP_SESSION_ID
238              RTSP session ID.  See CURLINFO_RTSP_SESSION_ID(3)
239
240       CURLINFO_RTSP_CLIENT_CSEQ
241              RTSP     CSeq     that     will     next     be    used.     See
242              CURLINFO_RTSP_CLIENT_CSEQ(3)
243
244       CURLINFO_RTSP_SERVER_CSEQ
245              RTSP    CSeq    that    will    next    be    expected.      See
246              CURLINFO_RTSP_SERVER_CSEQ(3)
247
248       CURLINFO_RTSP_CSEQ_RECV
249              RTSP CSeq last received.  See CURLINFO_RTSP_CSEQ_RECV(3)
250
251       CURLINFO_PROTOCOL
252              The  protocol  used  for  the  connection. (Added in 7.52.0) See
253              CURLINFO_PROTOCOL(3)
254
255       CURLINFO_SCHEME
256              The scheme used  for  the  connection.  (Added  in  7.52.0)  See
257              CURLINFO_SCHEME(3)
258

TIMES

260       An overview of the six time values available from curl_easy_getinfo()
261
262       curl_easy_perform()
263           |
264           |--NAMELOOKUP
265           |--|--CONNECT
266           |--|--|--APPCONNECT
267           |--|--|--|--PRETRANSFER
268           |--|--|--|--|--STARTTRANSFER
269           |--|--|--|--|--|--TOTAL
270           |--|--|--|--|--|--REDIRECT
271
272       NAMELOOKUP
273              CURLINFO_NAMELOOKUP_TIME  and fICURLINFO_NAMELOOKUP_TIME_T.  The
274              time it took from the start until the name  resolving  was  com‐
275              pleted.
276
277       CONNECT
278              CURLINFO_CONNECT_TIME  and CURLINFO_CONNECT_TIME_T.  The time it
279              took from the start until the connect to  the  remote  host  (or
280              proxy) was completed.
281
282       APPCONNECT
283              CURLINFO_APPCONNECT_TIME  and  CURLINFO_APPCONNECT_TIME_T.   The
284              time it took from the start until the SSL connect/handshake with
285              the  remote  host was completed. (Added in 7.19.0) The latter is
286              the integer version (measuring microseconds).  (Added in 7.60.0)
287
288       PRETRANSFER
289              CURLINFO_PRETRANSFER_TIME and CURLINFO_PRETRANSFER_TIME_T.   The
290              time  it  took  from  the  start until the file transfer is just
291              about to begin. This  includes  all  pre-transfer  commands  and
292              negotiations  that  are  specific  to the particular protocol(s)
293              involved.
294
295       STARTTRANSFER
296              CURLINFO_STARTTRANSFER_TIME  and  CURLINFO_STARTTRANSFER_TIME_T.
297              The time it took from the start until the first byte is received
298              by libcurl.
299
300       TOTAL  CURLINFO_TOTAL_TIME and CURLINFO_TOTAL_TIME_T.   Total  time  of
301              the previous request.
302
303       REDIRECT
304              CURLINFO_REDIRECT_TIME  and  CURLINFO_REDIRECT_TIME_T.  The time
305              it took for all redirection steps include name lookup,  connect,
306              pretransfer  and  transfer before final transaction was started.
307              So, this is zero if no redirection took place.
308

RETURN VALUE

310       If the operation was successful, CURLE_OK  is  returned.  Otherwise  an
311       appropriate error code will be returned.
312

SEE ALSO

314       curl_easy_setopt(3)
315
316
317
318libcurl 7.61.1                   May 17, 2018             curl_easy_getinfo(3)
Impressum