1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_EXPECT_100_TIMEOUT_MS 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_HTTPPOST (3) 9 - CURLOPT_POST (3) 10Protocol: 11 - HTTP 12Added-in: 7.36.0 13--- 14 15# NAME 16 17CURLOPT_EXPECT_100_TIMEOUT_MS - timeout for Expect: 100-continue response 18 19# SYNOPSIS 20 21~~~c 22#include <curl/curl.h> 23 24CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EXPECT_100_TIMEOUT_MS, 25 long milliseconds); 26~~~ 27 28# DESCRIPTION 29 30Pass a long to tell libcurl the number of *milliseconds* to wait for a 31server response with the HTTP status 100 (Continue), 417 (Expectation Failed) 32or similar after sending an HTTP request containing an Expect: 100-continue 33header. If this times out before a response is received, the request body is 34sent anyway. 35 36# DEFAULT 37 381000 milliseconds 39 40# %PROTOCOLS% 41 42# EXAMPLE 43 44~~~c 45int main(void) 46{ 47 CURL *curl = curl_easy_init(); 48 if(curl) { 49 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); 50 51 /* wait 3 seconds for 100-continue */ 52 curl_easy_setopt(curl, CURLOPT_EXPECT_100_TIMEOUT_MS, 3000L); 53 54 curl_easy_perform(curl); 55 } 56} 57~~~ 58 59# %AVAILABILITY% 60 61# RETURN VALUE 62 63Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 64