Path: /sdk/http/reference
The structure show ins the docs looks like this
{
"requests": [
{ "type": "execute", "stmt": { "sql": "CREATE TABLE users (name)" } },
{ "type": "close" }
]
}
but results in a response with JSON parse error.
It worked ok when I switched to a structure as in this example in tests:
https://github.com/tursodatabase/libsql/blob/7fbef8358b8a504c368cbc1febf7413a0d9271e9/libsql-server/src/http/user/types.rs#L254
{
"statements": [
"select * from test",
{"q": "select ?", "params": [12, true]},
{"q": "select ?", "params": {":foo": "bar"}}
]
}