quickjs-tart

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

CURLOPT_HTTP_TRANSFER_DECODING.md (1255B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_HTTP_TRANSFER_DECODING
      5 Section: 3
      6 Source: libcurl
      7 Protocol:
      8   - HTTP
      9 See-also:
     10   - CURLOPT_ACCEPT_ENCODING (3)
     11   - CURLOPT_HTTP_CONTENT_DECODING (3)
     12 Added-in: 7.16.2
     13 ---
     14 
     15 # NAME
     16 
     17 CURLOPT_HTTP_TRANSFER_DECODING - HTTP transfer decoding control
     18 
     19 # SYNOPSIS
     20 
     21 ~~~c
     22 #include <curl/curl.h>
     23 
     24 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_TRANSFER_DECODING,
     25                          long enabled);
     26 ~~~
     27 
     28 # DESCRIPTION
     29 
     30 Pass a long to tell libcurl how to act on transfer decoding. If set to zero,
     31 transfer decoding is disabled, if set to 1 it is enabled (default). libcurl
     32 does chunked transfer decoding by default unless this option is set to zero.
     33 
     34 # DEFAULT
     35 
     36 1
     37 
     38 # %PROTOCOLS%
     39 
     40 # EXAMPLE
     41 
     42 ~~~c
     43 int main(void)
     44 {
     45   CURL *curl = curl_easy_init();
     46   if(curl) {
     47     CURLcode ret;
     48     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     49     curl_easy_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, 0L);
     50     ret = curl_easy_perform(curl);
     51   }
     52 }
     53 ~~~
     54 
     55 # %AVAILABILITY%
     56 
     57 # RETURN VALUE
     58 
     59 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     60 
     61 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     62 libcurl-errors(3).