Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions ballerina/client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// specific language governing permissions and limitations
// under the License.

import ballerina/data.jsondata;
import ballerina/http;

public isolated client class Client {
Expand Down Expand Up @@ -52,7 +53,7 @@
resourcePath = resourcePath + check getPathForQueryParam(queries);
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
http:Request request = new;
json jsonBody = payload.toJson();
json jsonBody = jsondata:toJson(payload);

Check warning on line 56 in ballerina/client.bal

View check run for this annotation

Codecov / codecov/patch

ballerina/client.bal#L56

Added line #L56 was not covered by tests
request.setPayload(jsonBody, "application/json");
return self.clientEp->post(resourcePath, request, httpHeaders);
}
Expand Down Expand Up @@ -102,7 +103,7 @@
resourcePath = resourcePath + check getPathForQueryParam(queries);
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
http:Request request = new;
json jsonBody = payload.toJson();
json jsonBody = jsondata:toJson(payload);

Check warning on line 106 in ballerina/client.bal

View check run for this annotation

Codecov / codecov/patch

ballerina/client.bal#L106

Added line #L106 was not covered by tests
request.setPayload(jsonBody, "application/json");
return self.clientEp->patch(resourcePath, request, httpHeaders);
}
Expand All @@ -119,7 +120,7 @@
}
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
http:Request request = new;
json jsonBody = payload.toJson();
json jsonBody = jsondata:toJson(payload);

Check warning on line 123 in ballerina/client.bal

View check run for this annotation

Codecov / codecov/patch

ballerina/client.bal#L123

Added line #L123 was not covered by tests
request.setPayload(jsonBody, "application/json");
return self.clientEp->post(resourcePath, request, httpHeaders);
}
Expand All @@ -136,7 +137,7 @@
}
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
http:Request request = new;
json jsonBody = payload.toJson();
json jsonBody = jsondata:toJson(payload);

Check warning on line 140 in ballerina/client.bal

View check run for this annotation

Codecov / codecov/patch

ballerina/client.bal#L140

Added line #L140 was not covered by tests
request.setPayload(jsonBody, "application/json");
return self.clientEp->post(resourcePath, request, httpHeaders);
}
Expand All @@ -153,7 +154,7 @@
}
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
http:Request request = new;
json jsonBody = payload.toJson();
json jsonBody = jsondata:toJson(payload);

Check warning on line 157 in ballerina/client.bal

View check run for this annotation

Codecov / codecov/patch

ballerina/client.bal#L157

Added line #L157 was not covered by tests
request.setPayload(jsonBody, "application/json");
return self.clientEp->post(resourcePath, request, httpHeaders);
}
Expand All @@ -170,7 +171,7 @@
}
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
http:Request request = new;
json jsonBody = payload.toJson();
json jsonBody = jsondata:toJson(payload);

Check warning on line 174 in ballerina/client.bal

View check run for this annotation

Codecov / codecov/patch

ballerina/client.bal#L174

Added line #L174 was not covered by tests
request.setPayload(jsonBody, "application/json");
return self.clientEp->post(resourcePath, request, httpHeaders);
}
Expand Down Expand Up @@ -204,7 +205,7 @@
}
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
http:Request request = new;
json jsonBody = payload.toJson();
json jsonBody = jsondata:toJson(payload);
request.setPayload(jsonBody, "application/json");
return self.clientEp->post(resourcePath, request, httpHeaders);
}
Expand All @@ -221,7 +222,7 @@
}
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
http:Request request = new;
json jsonBody = payload.toJson();
json jsonBody = jsondata:toJson(payload);

Check warning on line 225 in ballerina/client.bal

View check run for this annotation

Codecov / codecov/patch

ballerina/client.bal#L225

Added line #L225 was not covered by tests
request.setPayload(jsonBody, "application/json");
return self.clientEp->post(resourcePath, request, httpHeaders);
}
Expand All @@ -236,7 +237,7 @@
}
map<string|string[]> httpHeaders = http:getHeaderMap(headerValues);
http:Request request = new;
json jsonBody = payload.toJson();
json jsonBody = jsondata:toJson(payload);

Check warning on line 240 in ballerina/client.bal

View check run for this annotation

Codecov / codecov/patch

ballerina/client.bal#L240

Added line #L240 was not covered by tests
request.setPayload(jsonBody, "application/json");
return self.clientEp->post(resourcePath, request, httpHeaders);
}
Expand Down
Loading