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 12--- 13 14# NAME 15 16CURLOPT_EXPECT_100_TIMEOUT_MS - timeout for Expect: 100-continue response 17 18# SYNOPSIS 19 20~~~c 21#include <curl/curl.h> 22 23CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EXPECT_100_TIMEOUT_MS, 24 long milliseconds); 25~~~ 26 27# DESCRIPTION 28 29Pass a long to tell libcurl the number of *milliseconds* to wait for a 30server response with the HTTP status 100 (Continue), 417 (Expectation Failed) 31or similar after sending an HTTP request containing an Expect: 100-continue 32header. If this times out before a response is received, the request body is 33sent anyway. 34 35# DEFAULT 36 371000 milliseconds 38 39# EXAMPLE 40 41~~~c 42int main(void) 43{ 44 CURL *curl = curl_easy_init(); 45 if(curl) { 46 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); 47 48 /* wait 3 seconds for 100-continue */ 49 curl_easy_setopt(curl, CURLOPT_EXPECT_100_TIMEOUT_MS, 3000L); 50 51 curl_easy_perform(curl); 52 } 53} 54~~~ 55 56# AVAILABILITY 57 58Added in 7.36.0 59 60# RETURN VALUE 61 62Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 63