Annotation of embedaddon/curl/docs/libcurl/opts/CURLOPT_DOH_URL.3, revision 1.1

1.1     ! misho       1: .\" **************************************************************************
        !             2: .\" *                                  _   _ ____  _
        !             3: .\" *  Project                     ___| | | |  _ \| |
        !             4: .\" *                             / __| | | | |_) | |
        !             5: .\" *                            | (__| |_| |  _ <| |___
        !             6: .\" *                             \___|\___/|_| \_\_____|
        !             7: .\" *
        !             8: .\" * Copyright (C) 2018, 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_DOH_URL 3 "September 06, 2018" "libcurl 7.70.0" "curl_easy_setopt options"
        !            24: 
        !            25: .SH NAME
        !            26: CURLOPT_DOH_URL \- provide the DNS-over-HTTPS URL
        !            27: .SH SYNOPSIS
        !            28: #include <curl/curl.h>
        !            29: 
        !            30: CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DOH_URL, char *URL);
        !            31: .SH DESCRIPTION
        !            32: Pass in a pointer to a \fIURL\fP for the DOH server to use for name
        !            33: resolving. The parameter should be a char * to a zero terminated string which
        !            34: must be URL-encoded in the following format: "https://host:port/path". It MUST
        !            35: specify a HTTPS URL.
        !            36: 
        !            37: libcurl doesn't validate the syntax or use this variable until the transfer is
        !            38: issued. Even if you set a crazy value here, \fIcurl_easy_setopt(3)\fP will
        !            39: still return \fICURLE_OK\fP.
        !            40: 
        !            41: curl sends POST requests to the given DNS-over-HTTPS URL.
        !            42: 
        !            43: To find the DOH server itself, which might be specified using a name, libcurl
        !            44: will use the default name lookup function. You can bootstrap that by providing
        !            45: the address for the DOH server with \fICURLOPT_RESOLVE(3)\fP.
        !            46: 
        !            47: Disable DOH use again by setting this option to NULL.
        !            48: .SH DEFAULT
        !            49: NULL - there is no default DOH URL. If this option isn't set, libcurl will use
        !            50: the default name resolver.
        !            51: .SH PROTOCOLS
        !            52: All
        !            53: .SH EXAMPLE
        !            54: .nf
        !            55: CURL *curl = curl_easy_init();
        !            56: if(curl) {
        !            57:   curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
        !            58:   curl_easy_setopt(curl, CURLOPT_DOH_URL, "https://dns.example.com");
        !            59:   curl_easy_perform(curl);
        !            60: }
        !            61: .fi
        !            62: .SH AVAILABILITY
        !            63: Added in 7.62.0
        !            64: .SH RETURN VALUE
        !            65: Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient
        !            66: heap space.
        !            67: 
        !            68: Note that \fIcurl_easy_setopt(3)\fP won't actually parse the given string so
        !            69: given a bad DOH URL, curl will not detect a problem until it tries to resolve
        !            70: a name with it.
        !            71: .SH "SEE ALSO"
        !            72: .BR CURLOPT_VERBOSE "(3), " CURLOPT_RESOLVE "(3), "

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