1 .\" **************************************************************************
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
8 .\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at http://curl.haxx.se/docs/copyright.html.
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
21 .\" **************************************************************************
23 .TH CURLOPT_HTTP_VERSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
25 CURLOPT_HTTP_VERSION \- specify HTTP protocol version to use
27 #include <curl/curl.h>
29 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_VERSION, long version);
31 Pass \fIversion\fP a long, set to one of the values described below. They
32 force libcurl to use the specific HTTP versions. This is not sensible to do
33 unless you have a good reason. You have to set this option if you want to use
34 libcurl's HTTP/2 support.
36 .IP CURL_HTTP_VERSION_NONE
37 We don't care about what version the library uses. libcurl will use whatever
39 .IP CURL_HTTP_VERSION_1_0
40 Enforce HTTP 1.0 requests.
41 .IP CURL_HTTP_VERSION_1_1
42 Enforce HTTP 1.1 requests.
43 .IP CURL_HTTP_VERSION_2_0
44 Attempt HTTP 2.0 requests. libcurl will fall back to HTTP 1.x if HTTP 2.0
45 can't be negotiated with the server.
47 CURL_HTTP_VERSION_NONE
55 Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
57 .BR CURLOPT_SSLVERSION "(3), " CURLOPT_HTTP200ALIASES "(3), "