Client: HubClient

HTTP Based client for WebSub content publishing to subscribers


Initializes the websubhub:HubClient.

1websubhub:HubClient hubClientEP = check new({
2 hub: "",
3 hubMode: "subscribe",
4 hubCallback: "",
5 hubTopic: "",
6 hubSecret: "key"
init (Subscription subscription, *ClientConfiguration config)
  • subscription Subscription
  • Original websubhub:Subscription record, which contains the details of the subscriber

Remote Methods


Distributes the published content to the subscribers.


function notifyContentDistribution(ContentDistributionMessage message) returns ContentDistributionSuccess | SubscriptionDeletedError | Error
Isolated Function
Remote Function

Distributes the published content to the subscribers.

1ContentDistributionSuccess publishUpdate = check websubHubClientEP->notifyContentDistribution({ content: "This is sample content" });


Return Type

(ContentDistributionSuccess | SubscriptionDeletedError | Error)

An websubhub:Error if an exception occurred, a websubhub:SubscriptionDeletedError if the subscriber responded with HTTP 410, or else a websubhub:ContentDistributionSuccess for successful content delivery