Sending multiple requests when the bot is running
Hello,
My bot is using a Web Chat channel and hosted on azurewebsites.net. When I open the webpage and Fiddler I see that this webpage makes thousands requests. Here is a fiddler screenshot:
Why is it happening? Is it possible to fix? Thank you!
MS can confirm it, but your bot is polling for new messages.
In my opinion, it's a pity that directline –and apparently other channels– doesn't come with some kind of push mechanism. In some scenarios (ex. mobile app) it could be a blocking issue (ex. battery drain). I don't know if there is a recommended way to solve this issue.
@palmerabollo As you mentioned, this is true for clients using the Direct Line API, like Web Chat or mobile apps. Not true, however, for other channels, as they use the Bot Connector API which does not store messages. (Just clarifying your remark regarding other channels.)
Thanks for your replies! I don't use the Direct Line API . Now it's a simple url wrapped in iframe generated by web chat channel and embedded into html code. I am going to develop my own UI and to use the Direct Line API. Is there a chance that it will solve this problem? This is a CaptionBot developed by Microsoft . When I open Fiddler there are no multiple requests from this page.
Webchat is using Direct line API which uses a polling mechanism to fetch messages from bot.
Thank you, now I understand why it's happening.