Annotation of embedaddon/curl/docs/libcurl/opts/CURLOPT_PROXYAUTH.3, revision 1.1.1.1

1.1       misho       1: .\" **************************************************************************
                      2: .\" *                                  _   _ ____  _
                      3: .\" *  Project                     ___| | | |  _ \| |
                      4: .\" *                             / __| | | | |_) | |
                      5: .\" *                            | (__| |_| |  _ <| |___
                      6: .\" *                             \___|\___/|_| \_\_____|
                      7: .\" *
                      8: .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
                      9: .\" *
                     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 https://curl.haxx.se/docs/copyright.html.
                     13: .\" *
                     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.
                     17: .\" *
                     18: .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
                     19: .\" * KIND, either express or implied.
                     20: .\" *
                     21: .\" **************************************************************************
                     22: .\"
                     23: .TH CURLOPT_PROXYAUTH 3 "May 30, 2017" "libcurl 7.70.0" "curl_easy_setopt options"
                     24: 
                     25: .SH NAME
                     26: CURLOPT_PROXYAUTH \- set HTTP proxy authentication methods to try
                     27: .SH SYNOPSIS
                     28: #include <curl/curl.h>
                     29: 
                     30: CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYAUTH, long bitmask);
                     31: .SH DESCRIPTION
                     32: Pass a long as parameter, which is set to a bitmask, to tell libcurl which
                     33: HTTP authentication method(s) you want it to use for your proxy
                     34: authentication.  If more than one bit is set, libcurl will first query the
                     35: site to see what authentication methods it supports and then pick the best one
                     36: you allow it to use. For some methods, this will induce an extra network
                     37: round-trip. Set the actual name and password with the
                     38: \fICURLOPT_PROXYUSERPWD(3)\fP option.
                     39: 
                     40: The bitmask can be constructed by or'ing together the bits fully listed and
                     41: described in the \fICURLOPT_HTTPAUTH(3)\fP man page.
                     42: .SH DEFAULT
                     43: CURLAUTH_BASIC
                     44: .SH PROTOCOLS
                     45: HTTP
                     46: .SH EXAMPLE
                     47: .nf
                     48: CURL *curl = curl_easy_init();
                     49: if(curl) {
                     50:   CURLcode ret;
                     51:   curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
                     52:   /* use this proxy */
                     53:   curl_easy_setopt(curl, CURLOPT_PROXY, "http://local.example.com:1080");
                     54:   /* allow whatever auth the proxy speaks */
                     55:   curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
                     56:   /* set the proxy credentials */
                     57:   curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "james:007");
                     58:   ret = curl_easy_perform(curl);
                     59:   curl_easy_cleanup(curl);
                     60: }
                     61: .fi
                     62: .SH AVAILABILITY
                     63: Added in 7.10.7
                     64: .SH RETURN VALUE
                     65: Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
                     66: CURLE_NOT_BUILT_IN if the bitmask specified no supported authentication
                     67: methods.
                     68: .SH "SEE ALSO"
                     69: .BR CURLOPT_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
                     70: .BR CURLOPT_PROXYUSERPWD "(3), " CURLOPT_PROXYPORT "(3), "

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>