Usually, "utf-8" works for most cases. However, it's possible that servers responding something else. Now pyswagger expects everything is utf-8, and would fail when it's not.
In short, we need to take care of this case:
text/html; charset=UTF-16
One thing we can do is always decode what we go in byte-stream by the encoding method indicated by "charset", and default value is "utf-8".
Usually, "utf-8" works for most cases. However, it's possible that servers responding something else. Now pyswagger expects everything is utf-8, and would fail when it's not.
In short, we need to take care of this case:
One thing we can do is always decode what we go in byte-stream by the encoding method indicated by "charset", and default value is "utf-8".