1--- 2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_TRAILERDATA 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_TRAILERFUNCTION (3) 9 - CURLOPT_WRITEFUNCTION (3) 10--- 11 12# NAME 13 14CURLOPT_TRAILERDATA - pointer passed to trailing headers callback 15 16# SYNOPSIS 17 18~~~c 19#include <curl.h> 20 21CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRAILERDATA, void *userdata); 22~~~ 23 24# DESCRIPTION 25 26Data pointer to be passed to the HTTP trailer callback function. 27 28# DEFAULT 29 30NULL 31 32# PROTOCOLS 33 34HTTP 35 36# EXAMPLE 37 38~~~c 39struct MyData { 40 void *custom; 41}; 42 43int main(void) 44{ 45 CURL *curl = curl_easy_init(); 46 if(curl) { 47 struct MyData data; 48 curl_easy_setopt(curl, CURLOPT_TRAILERDATA, &data); 49 } 50} 51~~~ 52 53# AVAILABILITY 54 55This option was added in curl 7.64.0 and is present if HTTP support is enabled 56 57# RETURN VALUE 58 59Returns CURLE_OK. 60