~ubuntu-branches/ubuntu/quantal/curl/quantal

« back to all changes in this revision

Viewing changes to docs/libcurl/curl_easy_getinfo.3

  • Committer: Bazaar Package Importer
  • Author(s): Domenico Andreoli
  • Date: 2002-03-12 19:06:21 UTC
  • Revision ID: james.westby@ubuntu.com-20020312190621-iqx7k9cipo5d0ifr
Tags: upstream-7.9.5
ImportĀ upstreamĀ versionĀ 7.9.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" You can view this file with:
 
2
.\" nroff -man [file]
 
3
.\" $Id: curl_easy_getinfo.3,v 1.1 2002/03/04 10:09:49 bagder Exp $
 
4
.\"
 
5
.TH curl_easy_init 3 "31 Jan 2001" "libcurl 7.9.4" "libcurl Manual"
 
6
.SH NAME
 
7
curl_easy_getinfo - Extract information from a curl session (added in 7.4)
 
8
.SH SYNOPSIS
 
9
.B #include <curl/curl.h>
 
10
.sp
 
11
.BI "CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );"
 
12
.ad
 
13
.SH DESCRIPTION
 
14
Request internal information from the curl session with this function.  The
 
15
third argument
 
16
.B MUST
 
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:
 
24
.TP 0.8i
 
25
.B CURLINFO_EFFECTIVE_URL
 
26
Pass a pointer to a 'char *' to receive the last used effective URL.
 
27
.TP
 
28
.B CURLINFO_HTTP_CODE
 
29
Pass a pointer to a long to receive the last received HTTP code.
 
30
.TP
 
31
.B CURLINFO_FILETIME
 
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)
 
38
.TP
 
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.
 
42
.TP
 
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.
 
46
.TP
 
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.
 
50
.TP
 
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
 
55
protocol(s) involved.
 
56
.TP
 
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
 
61
the result.
 
62
.TP
 
63
.B CURLINFO_SIZE_UPLOAD
 
64
Pass a pointer to a double to receive the total amount of bytes that were
 
65
uploaded.
 
66
.TP
 
67
.B CURLINFO_SIZE_DOWNLOAD
 
68
Pass a pointer to a double to receive the total amount of bytes that were
 
69
downloaded.
 
70
.TP
 
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.
 
74
.TP
 
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.
 
78
.TP
 
79
.B CURLINFO_HEADER_SIZE
 
80
Pass a pointer to a long to receive the total size of all the headers
 
81
received.
 
82
.TP
 
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.
 
87
.TP
 
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)
 
92
.TP
 
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)
 
96
.TP
 
97
.B CURLINFO_CONTENT_LENGTH_UPLOAD
 
98
Pass a pointer to a double to receive the specified size of the upload.
 
99
(Added in 7.6.1)
 
100
.TP
 
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)
 
106
.PP
 
107
 
 
108
.SH RETURN VALUE
 
109
If the operation was successful, CURLE_OK is returned. Otherwise an
 
110
appropriate error code will be returned.
 
111
.SH "SEE ALSO"
 
112
.BR curl_easy_setopt "(3)"
 
113
.SH BUGS
 
114
Surely there are some, you tell me!