Comments (3)
There is an official way, using input/output bindings.
I'd also recommend you install the Azure Functions VSCode Extension (and VSCode if your not already using it)
Samples
listen for updates in the database
cosmosTrigger1/function.json
{
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "documents",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "AzureWebJobsStorage",
"databaseName": "database",
"collectionName": "collections",
"createLeaseCollectionIfNotExists": "true"
}
]
}
Docs
In the docs, any tab other than C# should have the same function.json
as you should use with Rust.
Sidenote: This question could have been asked on StackOverflow as all this info is publicly documented but it takes a good amount of research and a while to understand!
Good luck with your handler and if you need some more help feel free to reply but I can't help with Rust code/syntax
from functions-custom-handlers.
This question could have been asked on StackOverflow
@fallsimply I have published the question on SO.
I'm waiting for your answer ))
from functions-custom-handlers.
For anyone who had the same issue. The cosmos db data can be found under Data.”name” ( name is the name you set on the in binding ) in the request body.
I was building my http triggers first and thought the behavior was the same with “enableForwardingHttpRequest” set to true, but this only works for http triggers with every other trigger the function host sends the raw data to a with a post method and route equal to the folder name where the function.json is found.
from functions-custom-handlers.
Related Issues (11)
- Golang Handler encountering System.Net.Sockets.SocketException HOT 1
- For the R sample, where does the R runtime come from? HOT 2
- How to log properly from a custom handler HOT 3
- Deleted code samples HOT 7
- supported keys for response payload. HOT 1
- Example SimpleHttpTriggerWithReturn
- R Example Does Not Work as Docker Image
- Missing Timer trigger sample
- Examples that work on Docker & Linux
- Unable to execute a simple Go custom handler HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from functions-custom-handlers.