/
usr
/
share
/
doc
/
python3-pycurl
/
doc
/
docstrings
/
/usr/share/doc/python3-pycurl/doc/docstrings
mkdir
upload
Name
Size
Mode
Actions
curl.rst
377
0644
edit
dl
rm
curl_close.rst
319
0644
edit
dl
rm
curl_errstr.rst
465
0644
edit
dl
rm
curl_errstr_raw.rst
444
0644
edit
dl
rm
curl_getinfo.rst
3249
0644
edit
dl
rm
curl_getinfo_raw.rst
3077
0644
edit
dl
rm
curl_pause.rst
398
0644
edit
dl
rm
curl_perform.rst
220
0644
edit
dl
rm
curl_perform_rb.rst
699
0644
edit
dl
rm
curl_perform_rs.rst
1091
0644
edit
dl
rm
curl_reset.rst
276
0644
edit
dl
rm
curl_setopt.rst
4591
0644
edit
dl
rm
curl_setopt_string.rst
1236
0644
edit
dl
rm
curl_set_ca_certs.rst
144
0644
edit
dl
rm
curl_unsetopt.rst
599
0644
edit
dl
rm
multi.rst
126
0644
edit
dl
rm
multi_add_handle.rst
522
0644
edit
dl
rm
multi_assign.rst
267
0644
edit
dl
rm
multi_close.rst
291
0644
edit
dl
rm
multi_fdset.rst
900
0644
edit
dl
rm
multi_info_read.rst
695
0644
edit
dl
rm
multi_perform.rst
201
0644
edit
dl
rm
multi_remove_handle.rst
435
0644
edit
dl
rm
multi_select.rst
734
0644
edit
dl
rm
multi_setopt.rst
1438
0644
edit
dl
rm
multi_socket_action.rst
293
0644
edit
dl
rm
multi_socket_all.rst
123
0644
edit
dl
rm
multi_timeout.rst
202
0644
edit
dl
rm
pycurl_global_cleanup.rst
185
0644
edit
dl
rm
pycurl_global_init.rst
321
0644
edit
dl
rm
pycurl_module.rst
414
0644
edit
dl
rm
pycurl_version_info.rst
656
0644
edit
dl
rm
share.rst
234
0644
edit
dl
rm
share_close.rst
313
0644
edit
dl
rm
share_setopt.rst
765
0644
edit
dl
rm
Edit:
/usr/share/doc/python3-pycurl/doc/docstrings/curl_getinfo_raw.rst
(3077B)
getinfo_raw(option) -> Result Extract and return information from a curl session, returning string data as byte strings. Corresponds to `curl_easy_getinfo`_ in libcurl. The ``getinfo_raw`` method should not be called unless ``perform`` has been called and finished. *option* is a constant corresponding to one of the ``CURLINFO_*`` constants in libcurl. Most option constant names match the respective ``CURLINFO_*`` constant names with the ``CURLINFO_`` prefix removed, for example ``CURLINFO_CONTENT_TYPE`` is accessible as ``pycurl.CONTENT_TYPE``. Exceptions to this rule are as follows: - ``CURLINFO_FILETIME`` is mapped as ``pycurl.INFO_FILETIME`` - ``CURLINFO_COOKIELIST`` is mapped as ``pycurl.INFO_COOKIELIST`` - ``CURLINFO_CERTINFO`` is mapped as ``pycurl.INFO_CERTINFO`` - ``CURLINFO_RTSP_CLIENT_CSEQ`` is mapped as ``pycurl.INFO_RTSP_CLIENT_CSEQ`` - ``CURLINFO_RTSP_CSEQ_RECV`` is mapped as ``pycurl.INFO_RTSP_CSEQ_RECV`` - ``CURLINFO_RTSP_SERVER_CSEQ`` is mapped as ``pycurl.INFO_RTSP_SERVER_CSEQ`` - ``CURLINFO_RTSP_SESSION_ID`` is mapped as ``pycurl.INFO_RTSP_SESSION_ID`` The type of return value depends on the option, as follows: - Options documented by libcurl to return an integer value return a Python integer (``long`` on Python 2, ``int`` on Python 3). - Options documented by libcurl to return a floating point value return a Python ``float``. - Options documented by libcurl to return a string value return a Python byte string (``str`` on Python 2, ``bytes`` on Python 3). The string contains whatever data libcurl returned. Use :ref:`getinfo <getinfo>` to retrieve this data as a Unicode string on Python 3. - ``SSL_ENGINES`` and ``INFO_COOKIELIST`` return a list of byte strings. The same encoding caveats apply; use :ref:`getinfo <getinfo>` to retrieve the data as a list of potentially Unicode strings. - ``INFO_CERTINFO`` returns a list with one element per certificate in the chain, starting with the leaf; each element is a sequence of *(key, value)* tuples where both ``key`` and ``value`` are byte strings. String encoding caveats apply; use :ref:`getinfo <getinfo>` to retrieve certificate data as potentially Unicode strings. On Python 2, ``getinfo`` and ``getinfo_raw`` behave identically. Example usage:: import pycurl c = pycurl.Curl() c.setopt(pycurl.OPT_CERTINFO, 1) c.setopt(pycurl.URL, "https://python.org") c.setopt(pycurl.FOLLOWLOCATION, 1) c.perform() print(c.getinfo_raw(pycurl.HTTP_CODE)) # --> 200 print(c.getinfo_raw(pycurl.EFFECTIVE_URL)) # --> b"https://www.python.org/" certinfo = c.getinfo_raw(pycurl.INFO_CERTINFO) print(certinfo) # --> [((b'Subject', b'C = AU, ST = Some-State, O = PycURL test suite, CN = localhost'), (b'Issuer', b'C = AU, ST = Some-State, O = PycURL test suite, OU = localhost, CN = localhost'), (b'Version', b'0'), ...)] Raises pycurl.error exception upon failure. *Added in version 7.43.0.2.* .. _curl_easy_getinfo: https://curl.haxx.se/libcurl/c/curl_easy_getinfo.html
Save
cmd:
run