Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues identified in SL Alpha3 Release #75

Merged

Conversation

ayeshLK
Copy link
Member

@ayeshLK ayeshLK commented Mar 28, 2021

Purpose

$subject

Approach

  • Add support for x-www-form-urlencoded content delivery with websubhub:HubClient.
  • Fix websubhub module related documentation issues.
  • Refactor code-base according to latest guidelines.

Samples

Usage of websubhub:HubClient to deliver x-www-form-urlencoded content is as follows.

websubhub:Subscription subscriptionMsg = {
    hub: "https://hub.com", 
    hubMode: "subscribe", 
    hubCallback: "https://sample.subscriber/callback", 
    hubTopic: "https://topic.com", 
    hubSecret: "secretkey1"
};

websubhub:HubClient hubClientEp = check new(subscriptionMsg);

map<string> publishedContent = {
    "query1": "value1",
    "query2": "value2"
};

websubhub:ContentDistributionMessage msg = {
    contentType: "application/x-www-form-urlencoded",
    content: publishedContent
};
var publishResponse = hubClientEp->notifyContentDistribution(msg);

Fixes #1107
Fixes #2033
Fixes #2035

@codecov
Copy link

codecov bot commented Mar 28, 2021

Codecov Report

Merging #75 (fc690c5) into main (663c2da) will increase coverage by 1.15%.
The diff coverage is 83.87%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #75      +/-   ##
============================================
+ Coverage     74.45%   75.61%   +1.15%     
- Complexity      178      186       +8     
============================================
  Files            10       10              
  Lines           740      771      +31     
  Branches        384      397      +13     
============================================
+ Hits            551      583      +32     
+ Misses          189      188       -1     
Impacted Files Coverage Δ Complexity Δ
websubhub-ballerina/hub_listener.bal 85.29% <ø> (+4.21%) 0.00 <0.00> (ø)
websubhub-ballerina/http_service.bal 69.85% <20.00%> (+0.78%) 1.00 <0.00> (ø)
websubhub-ballerina/hub_client.bal 85.82% <88.33%> (+0.38%) 36.00 <25.00> (+5.00)
websubhub-ballerina/commons.bal 84.09% <100.00%> (+2.03%) 3.00 <0.00> (ø)
websubhub-ballerina/publisher_client.bal 78.41% <100.00%> (-0.16%) 12.00 <4.00> (ø)
websubhub-ballerina/utils.bal 69.16% <100.00%> (+1.20%) 77.00 <4.00> (+3.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 663c2da...fc690c5. Read the comment docs.

@shafreenAnfar shafreenAnfar merged commit 47e87a2 into ballerina-platform:main Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants