Closed pubudu91 closed 6 years ago
Tested the issue with 0.95.1 ballerina version and works fine.
@http:configuration{basePath: "/chuck"}
service<http> chuck {
endpoint<http:HttpClient> chuckService {
create http:HttpClient("https://api.chucknorris.io", {});
}
@http:resourceConfig {
path: "/",
methods: ["GET"]
}
resource chuckJokes(http:Request req, http:Response res) {
http:Response resp;
resp,_ = chuckService.get("jokes/random", {});
res.forward(resp);
}
}
As per the comment, closing the issue.
When invoking an HTTP action where the path does not start with '/', the client is kept hanging, waiting for a response. For example, consider the following code snippet:
In the above example, the path is given as
jokes/random
and this causes the client to hang and timeout. If we add the '/' as follows:/jokes/random
, it works as expected.Given below are the trace logs for the error scenario.