Closed KaiWalter closed 9 months ago
Hi @KaiWalter, Thank you for your question. For DaprStateOutput binding value
is a required property, so the data that needs to be saved in state store should be enclosed in a value
property.
Please see the documentation here for required properties of Dapr State Output binding.
Http trigger curl request:
curl --location 'http://localhost:7071/api/state/order' \
--header 'Content-Type: application/json' \
--data '{
"value": {
"orderId": "123"
}
}'
Thanks @ASHIQUEMD - my bad, I overlooked that detail. Sending the POST with a value parameter works.
### Save state
POST http://localhost:7071/api/state/hello
{
"value":"Hello World"
}
I recoded
samples/dotnet-isolated-azurefunction/OutputBinding/StateOutputBinding.cs
in my own sample https://github.com/KaiWalter/azure-functions-dapr-experimental/blob/main/dotnet-cs-v4/PostState.cs likeafter already struggling with #151 and implementing the suggested workaround, independent whether I start with
or
I get this error