Call Azure Function from Javascript

前端 未结 2 1507
你的背包
你的背包 2021-01-18 18:32

I have a simple HTML page which has a Textbox and a Submit Button. I have a Azure Function which when hit takes in the content of the textbox, which we should send to the Az

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-18 19:30

    That looks like a cross origin request blocked. Normally you can't make a request from the browser to a different host. You will either need to use CORS or backend code.

    Notice the method of the request is OPTIONS instead of Post or Get. Typically this means the browser is blocking the call.

    Here is a link to a Node solution. https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook

提交回复
热议问题