Hi,
I'd previously created a simple comment storing system in Firebase using the REST API from C++ and recently noticed it failed when Chinese characters where included in the values.
This is an example of the packets I'm trying to send:
POST / HTTP/1.1
Accept: */*
User-Agent: fireClient/1.0
Connection: keep-alive
Keep-Alive: timeout=0, max=0
Content-Type: application/json; charset=utf-8
Content-Length: 198
Pragma: no-cache
{
"CommentObject":
{
"Comment": "是",
"Location": "X=1.000 Y=2.000 Z=3.000",
"Rotation": "P=5.000000 Y=6.000000 R=4.000000",
"Date": "2015.10.12-15.24.48",
"Resolved": false
}
}
It's all correctly encoded in UTF-8, I've checked it multiple times.
Unfortunately, the first time I run the program I get HttpCode 400 with the error: "Invalid data; couldn't parse JSON object array or value.Perhaps you're using invalid characters in your key names."
Thereafter, each time I run it I get HttpCode 405 with the error: "error: unsupported request type"
Does anyone know what could be causing this?
Thanks,
Matt.