ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

Provide a convent API for form-urlencoded #4808

Open manuranga opened 1 year ago

manuranga commented 1 year ago

Currently, we have to call url:encode multiple times to do form-urlencoded. Please provide a convent api to do following.

string payload = "From=" + check url:encode(FROM_NO, "utf-8") +
                 "&To=" + check url:encode(req.phoneNo, "utf-8") +
                 "&Body=" + check url:encode(body, "utf-8");
manuranga commented 1 year ago

Came up during https://github.com/ballerina-guides/enterprise-integration-patterns/pull/75/files#r1326856694 We need to fix the pattern after this is implemented.