| 1 |
perform_rs() -> response_body |
| 2 |
|
| 3 |
Perform a file transfer and return response body as a string. |
| 4 |
|
| 5 |
This method arranges for response body to be saved in a BytesIO |
| 6 |
instance, then invokes :ref:`perform <perform>` |
| 7 |
to perform the file transfer, then decodes the response body in Python's |
| 8 |
default encoding and returns the decoded body as a Unicode string |
| 9 |
(``str`` instance). *Note:* decoding happens after the transfer finishes, |
| 10 |
thus an encoding error implies the transfer/network operation succeeded. |
| 11 |
|
| 12 |
Any transfer errors raise ``pycurl.error`` exception, |
| 13 |
just like in :ref:`perform <perform>`. |
| 14 |
|
| 15 |
Use :ref:`perform_rb <perform_rb>` to retrieve response body as a byte |
| 16 |
string (``bytes`` instance) without attempting to decode it. |
| 17 |
|
| 18 |
Raises ``pycurl.error`` exception upon failure. |
| 19 |
|
| 20 |
*Added in version 7.43.0.2.* |