I have discovered that the http library is UTF-8 encoding body data, which can cause problems with certain devices.
For example, if I send this body string in an http request:
{"device_id": "5357fc44-40ec-402b-8ef9-0303a88f7ab4", "action": "hold" }
What actually gets transmitted is this:
00000094 7b e2 80 9c 64 65 76 69 63 65 5f 69 64 e2 80 9d {...devi ce_id...
000000A4 3a 20 e2 80 9c 35 33 35 37 66 63 34 34 2d 34 30 : ...535 7fc44-40
000000B4 65 63 2d 34 30 32 62 2d 38 65 66 39 2d 30 33 30 ec-402b- 8ef9-030
000000C4 33 61 38 38 66 37 61 62 34 e2 80 9d 2c 20 e2 80 3a88f7ab 4..., ..
000000D4 9c 61 63 74 69 6f 6e e2 80 9d 3a 20 e2 80 9c 68 .action. ..: ...h
000000E4 6f 6c 64 e2 80 9d 20 7d old... }
As can be seen above, the double quote characters are being converted to UTF-8 left and right quotes (e2 80 9c / e2 80 9d).
Is there a way to control this encoding? I expected this type of thing to happen with the URI string, but not the body data…