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