.\" generated by cd2nroff 0.1 from CURLINFO_SIZE_DELIVERED.md
.TH CURLINFO_SIZE_DELIVERED 3 "2026-05-24" libcurl
.SH NAME
CURLINFO_SIZE_DELIVERED \- number of delivered bytes
.SH SYNOPSIS
.nf
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_DELIVERED,
                           curl_off_t *dlp);
.fi
.SH DESCRIPTION
Pass a pointer to a \fIcurl_off_t\fP to receive the total amount of bytes that
were passed on to the write callback in the download. The amount is only for
the latest transfer and gets reset again for each new transfer. This counts
actual payload data, what\(aqs also commonly called body. All meta and header
data is excluded from this amount (unless \fICURLOPT_HEADER(3)\fP is set).

The delivered size may differ from the size retrieved with
\fICURLINFO_SIZE_DOWNLOAD_T(3)\fP when \fICURLOPT_ACCEPT_ENCODING(3)\fP is used for
automatic data decompression, as this is then the size of the uncompressed
body while \fICURLINFO_SIZE_DOWNLOAD_T(3)\fP returns the size of the download.
.SH PROTOCOLS
This functionality affects all supported protocols
.SH EXAMPLE
.nf
int main(void)
{
  CURL *curl = curl_easy_init();
  if(curl) {
    CURLcode result;
    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");

    /* Perform the request */
    result = curl_easy_perform(curl);

    if(result == CURLE_OK) {
      /* check the size */
      curl_off_t dl;
      result = curl_easy_getinfo(curl, CURLINFO_SIZE_DELIVERED, &dl);
      if(result == CURLE_OK) {
        printf("Stored %" CURL_FORMAT_CURL_OFF_T " bytes\\n", dl);
      }
    }
  }
}
.fi
.SH AVAILABILITY
Added in curl 8.20.0
.SH RETURN VALUE
\fIcurl_easy_setopt(3)\fP returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non\-zero means an error occurred, see
\fIlibcurl\-errors(3)\fP.
.SH SEE ALSO
.BR CURLINFO_CONTENT_LENGTH_DOWNLOAD_T (3),
.BR CURLINFO_SIZE_DOWNLOAD_T (3),
.BR CURLOPT_MAXFILESIZE (3),
.BR curl_easy_getinfo (3),
.BR curl_easy_setopt (3)
