diff --git a/duniterpy/api/client.py b/duniterpy/api/client.py index ac590693d16f7472e0863e2cd8e5950f6b191dad..30ad5f1e38ff2939ac95a7f82d3ef1c112c379d9 100644 --- a/duniterpy/api/client.py +++ b/duniterpy/api/client.py @@ -13,7 +13,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import copy import json import logging from http.client import HTTPResponse @@ -269,7 +268,6 @@ class API: raise ValueError(f"status code != 200 => {response.status} ({content})") # get response content - return_response = copy.copy(response) content = response.read().decode("utf-8") # if schema supplied... @@ -278,7 +276,7 @@ class API: parse_response(content, schema) # return the chosen type - result = return_response # type: Any + result = response # type: Any if rtype == RESPONSE_TEXT: result = content elif rtype == RESPONSE_JSON: