问题描述
我知道这不是最佳实践,但是如果需要的话,APIM会允许Body进行GET调用吗?
I know it's not best practice but if we have to, would APIM allow a Body for a GET call?
要详细说明我是否在Azure函数中也有一个后端服务(也是GET),该后端服务与请求正文中的内容一起播放,如果我将APIM api放在它的前面(还是GET),然后进行调用使其具有主体,APIM会将该请求主体传递给 Azure功能?
To elaborate if I have a backend service in Azure Function (also a GET) inside that I play with what came in the request body, if I put a APIM api infront of it (again a GET) and then make a call to it having a Body, would APIM pass that request body to Azure Function?
致谢
赛义德
推荐答案
如果我查看Azure门户并且在我的一个API中,如果可以将GET终结点更改为具有主体,则不可能:
If I look into the Azure Portal and in one of my APIs if it is possible to change a GET endpoint to have a body it is not possible:
也许您可以对政策有所作为,但我对此表示怀疑.
Maybe you can do something with policies, but I doubt it.
此外,我不建议在GET请求中包含正文.您为什么想要身体健美? Azure Functions可以支持POST请求并具有主体,我拥有它们,它们执行得很好.
Furthermore, I would not recommend to have a body in a GET request. Why do you want to have a GET with body? Azure Functions can support POST requests and have a body, I have them and they perform perfectly fine.
亲切的问候.
这篇关于使用GET请求正文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!