response data not equal to curl

Summary.
I was to get info from same url, curl return 
{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}

but requests return
'0121\r\n{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}\r\n0\r\n\r\n'

How's the 0121\r\n & \r\n0\r\n\r\n come from ?

## Expected Result
{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}

What you expected.
{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}

## Actual Result
'0121\r\n{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}\r\n0\r\n\r\n'

What happened instead.
Have error message in rsp.text

## Reproduction Steps
by curl: 
RES=`curl -L -s -k --request GET \
		--url "https://$1/api/maintenance/maintenance/dual_image_config" \
		--header 'Cache-Control: no-cache' \
		--header 'Accept-Encoding: gzip, deflate, sdch' \
		--header 'Content-Type: application/json' \
		--header 'Connection: keep-alive'`
echo $RES

by requests:
import requests
DEFAULT_HEADER = {"Accept-Encoding": "gzip, deflate, br", 
                              "Cache-Control": "no-cache", 
                              "Connection": "keep-alive", 
                              "Content-Type": "application/json", 
                              "X-Requested-With": "XMLHttpRequest"}

url = "https://{0}/api/maintenance/maintenance/dual_image_config".format(sys.argv[1])
response = requests.get(url="", data=None, headers=DEFAULT_HEADER , verify=False)
print(repr(response.text))


## System Information

    $ python -m requests.help

```
[root@localhost ~]# python35 -m requests.help
{
  "chardet": {
    "version": "3.0.4"
  },
  "cryptography": {
    "version": ""
  },
  "idna": {
    "version": "2.8"
  },
  "implementation": {
    "name": "CPython",
    "version": "3.5.2"
  },
  "platform": {
    "release": "3.10.0-327.el7.x86_64",
    "system": "Linux"
  },
  "pyOpenSSL": {
    "openssl_version": "",
    "version": null
  },
  "requests": {
    "version": "2.21.0"
  },
  "system_ssl": {
    "version": "1000105f"
  },
  "urllib3": {
    "version": "1.24.1"
  },
  "using_pyopenssl": false
}

```

This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).


The `\r` and `\n` are special characters representing a carriage return and a new line respectively. 

A few things with your attached python code:
* In your get request change `url=""` to `url` so it looks like this `requests.get(url, data=None, headers=DEFAULT_HEADER , verify=False)`
* There is no need to use `repr` to print `response.text`. The `text` attribute is stored as a unicode string. The encoding of this text is stored in the `response.encoding` which requests determines from the http headers. If `response.text` contains all ascii characters just use `str(response.text)` to convert to a regular python string.




Sorry, I was use requests.get(url=url, data=None, headers=DEFAULT_HEADER , verify=False), it is my mistake on post issue.

When I use str(response.text) it return: '0121\r\n{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}\r\n0\r\n\r\n'

usually when we see response.text is not should be '{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}', then it will parse by json correctly ? I don't why it will have \r\n in start & the end.

use repr is because I want to see the real output on console.

Thanks and best regard.

Maybe try pass the encoding in `response.encoding` into the `str` function as the encoding (click [here](https://docs.python.org/3/library/functions.html#func-str) for details) or if you already now the encoding just pass that in.

I've noticed that you're receiving a json object in the response. You can access this data as a python dictionary using `response.json()` if it better suits your needs.

This doesn't look like an issue with requests it's just how the response has been encoded. This has been talked about previously [here](https://github.com/psf/requests/issues/1604) as well.

if use response.json() it will raise error: *** json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)

And I have change encoding but response still same.