Client: SubscriptionClient

The HTTP based client for WebSub subscription and unsubscription.

Constructor

Initializes the websub:SubscriptionClient.

init (string url, *ClientConfiguration config)
  • url string
  • The URL at which the subscription should be changed

Remote Methods

subscribe

Sends a subscription request to a WebSub Hub.

unsubscribe

Sends an unsubscription request to a WebSub Hub.

subscribe

function subscribe(SubscriptionChangeRequest subscriptionRequest) returns SubscriptionChangeResponse | error
Isolated Function
Remote Function

Sends a subscription request to a WebSub Hub.

1websub:SubscriptionChangeResponse|error response = websubHubClientEP->subscribe(subscriptionRequest);

Parameters

Return Type

(SubscriptionChangeResponse | error)

The SubscriptionChangeResponse indicating subscription details if the request was successful or else an error if an error occurred with the subscription request

unsubscribe

function unsubscribe(SubscriptionChangeRequest unsubscriptionRequest) returns SubscriptionChangeResponse | error
Isolated Function
Remote Function

Sends an unsubscription request to a WebSub Hub.

1websub:SubscriptionChangeResponse|error response = websubHubClientEP->unsubscribe(subscriptionRequest);

Parameters

Return Type

(SubscriptionChangeResponse | error)

An unsubscription details if the request was successful or else an error if an error occurred with the unsubscription request