-
What I want to achieve
I want to successfully send an HTTP request from Roblox to Azure Cosmos DB usingHttpService:RequestAsync()
with the required header format, including["x-ms-documentdb-partitionkey"]
as an array. -
Detail of the issue
When I attempt to include the["x-ms-documentdb-partitionkey"]
header as an array, I encounter the following error in the Roblox Studio console:
Header "x-ms-documentdb-partitionkey" has unallowed character "[" in value "["test"]"
.
However, according to the Azure Cosmos DB documentation, this header must be passed as an array. This creates a conflict, as Roblox’s HttpService
does not seem to accept headers in this format.
Here’s an example of my current code:
Headers = {
["Authorization"] = authorization,
["x-ms-version"] = "20**-**-**",
["x-ms-date"] = date,
["x-ms-documentdb-partitionkey"] = ["test"],
}
-
Solutions I have tried so far
I’ve attempted the following approaches:
- Changing the format of the header to a string (e.g.,
"[\"test\"]"
), but this does not meet the Cosmos DB requirements.