quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

CURLOPT_CRLF.md (1160B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_CRLF
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_CONV_FROM_NETWORK_FUNCTION (3)
      9   - CURLOPT_CONV_TO_NETWORK_FUNCTION (3)
     10 Protocol:
     11   - All
     12 Added-in: 7.1
     13 ---
     14 
     15 # NAME
     16 
     17 CURLOPT_CRLF - CRLF conversion
     18 
     19 # SYNOPSIS
     20 
     21 ~~~c
     22 #include <curl/curl.h>
     23 
     24 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLF, long conv);
     25 ~~~
     26 
     27 # DESCRIPTION
     28 
     29 Pass a long. If the value is set to 1 (one), libcurl converts Unix newlines to
     30 CRLF newlines on transfers. Disable this option again by setting the value to
     31 0 (zero).
     32 
     33 This is a legacy option of questionable use.
     34 
     35 # DEFAULT
     36 
     37 0
     38 
     39 # %PROTOCOLS%
     40 
     41 # EXAMPLE
     42 
     43 ~~~c
     44 int main(void)
     45 {
     46   CURL *curl = curl_easy_init();
     47   if(curl) {
     48     CURLcode ret;
     49     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
     50     curl_easy_setopt(curl, CURLOPT_CRLF, 1L);
     51     ret = curl_easy_perform(curl);
     52     curl_easy_cleanup(curl);
     53   }
     54 }
     55 ~~~
     56 
     57 # %AVAILABILITY%
     58 
     59 # RETURN VALUE
     60 
     61 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     62 
     63 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     64 libcurl-errors(3).