From the course: Scaling Out Using Azure SignalR Service
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Broadcasting messages from the client
From the course: Scaling Out Using Azure SignalR Service
Broadcasting messages from the client
- Our client application now is set up to listen for messages from our serverless SignalR Service. Now, let's configure it so we can send messages from our client. In order to send a message to the backend, we have to do it via HTTP request. We need to call the appropriate Azure function that will handle our request and broadcast our message to other clients. Let's navigate to the function which handles sending our messages. Every time the user wants to send a message, we need to make an HTTP request to the messages function. The messages function URL is under the API-based URL which is the main function's URL/API/messages. The method is going to be post and the body is going to be our message object, which has a property for sender, which in our case is going to be our username and the text, which is a text message that the user type. Now, let's send the changes and try this in action. Make sure to reload the page…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Exploring the Azure SignalR Service serverless mode1m 48s
-
(Locked)
Adding the negotiation endpoint5m 56s
-
(Locked)
Adding hub endpoints6m 6s
-
(Locked)
Connecting clients using a serverless SignalR Service5m 18s
-
(Locked)
Broadcasting messages from the client2m 14s
-
(Locked)
Broadcasting messages from the server3m 31s
-
(Locked)
Authenticating users with a serverless Azure SignalR Service instance7m 43s
-
(Locked)
Challenge: Authenticating with Facebook authentication23s
-
(Locked)
Solution: Authenticating with Facebook authentication3m 25s
-
(Locked)
-
-