Using python 3.7
I'm trying to build a small script that will post data using an api however I'm not able to get the response.content properly because there's some strange characters coming out.
import requests
files = {
'content': (None, 'text'),
}
response = requests.post('http://localhost/api/v2', files=files)
print (response.content)
Outputs: b'http://localhost/1NSZAOWE\n'
I tried erasing characters doing
txt = (response.content)
print (txt[1:])
Outputs: b'ttp://localhost/2LSALWE\n'
Can someone help me finding out a way to avoid getting those odd characters in the url that comes out as response.content?