I have managed to find the solution to my own problem.
def main(req: func.HttpRequest)-> func.HttpResponse:
datevalue = req.headers.get("af_datevalue")
The value is to be defined as a HEADER and not in the body.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
Here is the scenario.
I have Azure Function code written in python and correctly deployed to azure. I have also created a pipeline with Copy activity with a DateTime string as a parameter. I wish to pass this parameter to Azure function.How do tell azure function that there is a parameter available to be processed and how do i get it into my pyhon code so i can use and log it? I am not sure if i have to configure my binding file , if so how do i do it? or if there is another way to approach it ?
This is my entry point
def main(req: func.HttpRequest) -> func.HttpResponse:
.function.json
{
"scriptFile": "init.py",
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"get",
"post"
]
},
{
"type": "http",
"direction": "out",
"name": "$return"
}
]
}
I have managed to find the solution to my own problem.
def main(req: func.HttpRequest)-> func.HttpResponse:
datevalue = req.headers.get("af_datevalue")
The value is to be defined as a HEADER and not in the body.