shayanmalinda
shayanmalinda

Reputation: 2283

Passing Path Parameters in Ballerina HTTP Client

In Ballerina HTTP client, we can send requests using the following syntax:

Album[] albums = check albumClient->/albums;

But if we need to bind a variable as a path parameter, how to do that?

string albumId = "123";
Album[] albums = check albumClient->/albums/123;

How can I set the value dynimacally?

Upvotes: 0

Views: 62

Answers (1)

shayanmalinda
shayanmalinda

Reputation: 2283

It works as

Album[] albums = check albumClient->/albums/[albumId];

Upvotes: 0

Related Questions