Skip to content Skip to sidebar Skip to footer

Flask's Request.data Returns Bytes Data, However Sometimes Automatically Decoded

I am using Postman to invoke a flask POST endpoint with an .xml file For most of the .xml files the Flask's request.data returns bytes data (encoded). Example: b'\xff\xfe\x001\x006

Solution 1:

The second example is still byte code. It is not decoded, it just happens that certain byte values can be represented as ASCII chars.

So, nothing to worry.

Post a Comment for "Flask's Request.data Returns Bytes Data, However Sometimes Automatically Decoded"