-
Notifications
You must be signed in to change notification settings - Fork 758
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
const string array not being added to json payload #43748
Comments
Constant arrays are represented as tuple type in Ballerina. We are using Line 290 in 35de750
@warunalakshitha / @HindujaB FYI As a workaround, you could use the http:Request newRequest = new;
newRequest.setJsonPayload({
roles: CONST_ROLES,
name: "John"
}.toJson());
http:Response|error newResponse = httpClient->post("/req/path", newRequest); |
The |
This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now. |
Description
I have a string array that I need to send inside a json payload of an http request. I have declared this array a
const
. When I add it to the json payload and send the request, the value is not being sent in the request.Steps to Reproduce
Declare a const string array:
Add this value in an http request payload:
Trace logs show the following as the req payload:
Version
2201.10.0
Environment Details (with versions)
OS: MacOS Sonoma
The text was updated successfully, but these errors were encountered: