rpi-pico-micropython-esp8266-lib
rpi-pico-micropython-esp8266-lib copied to clipboard
Bugfix: Extracting data from byte response instead of string
The response of get call looks like this:
{"key": "value}'
As you can see there is an apostrophe at the end. This comes because of the wrong conversion of byte to string.
b'HTTP/1.1 200 OK\r\n ............ {"key": "value}'
after a lot of splits the apostrophe was forgotten.
This PR extracts data from the upstream without converting it to string.
After the response here, we could followings:
Parsing to string res = str(httpRes, 'utf-8') and then converting it to json json.loads(res)