I may be poor at googling, but so far I have come up dry. Is there no such thing as a universal decoder for HTTP responses, where you give it the body and the headers, and it returns the decoded data?
For example:
response = requests.get("...")
body = clever_package.decode(response.body, response.headers)
This is using the requests package to get the data, though this isn't strictly necessary. Is there no universal decoder which takes the contentType and isBase64Encoded headers and works its magic?
Perhaps I'm not seeing an obvious flaw in such a package, which explains why I can't find it anywhere.
Cheers!
Aucun commentaire:
Enregistrer un commentaire