I am new in Azure function. I'm unable to understand what is the purpose of req.get_body()
in azure function?? Can we pass binary image content in local host api(e.g-http://localhost:7071/api/HttpTrigger1
) by using req.get_body()?? If yes, Please tell me how to pass binary image content in local host.
I'm trying it with name = req.params.get('name')
. But problem is that if image content is small then i can pass successfully but if image content is large it show error.
Please help me out
Yes, as you mentioned in question, "Get" method request can just be used with small request parameter. If your image content is large, we'd better to use "Post" method to request the function and put the binary in the request body of "Post" request. Apart from this, "Post" method is more security than "Get" method request.
When you test in local, you just need to use "Postman" to do it. Download "Postman" and do it like below screenshot:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With