pippo
pippo copied to clipboard
Add protobuf support
Pull Request Test Coverage Report for Build 1069
- 1 of 63 (1.59%) changed or added relevant lines in 11 files are covered.
- 1 unchanged line in 1 file lost coverage.
- Overall coverage decreased (-0.2%) to 21.478%
Files with Coverage Reduction | New Missed Lines | % |
---|---|---|
pippo-core/src/main/java/ro/pippo/core/Response.java | 1 | 15.56% |
<!-- | Total: | 1 |
Totals | |
---|---|
Change from base Build 1068: | -0.2% |
Covered Lines: | 1392 |
Relevant Lines: | 6481 |
💛 - Coveralls
Interesting. This PR is a particular case of #407. I will push my work on GitHub in a separate branch to make my work public.
Does my work look good? I think this may solve #407 as well, as you said :+1:
I use it like this, where LoginResponse
obviously is a Protobuf Message:
ctx.status(HttpStatus.OK_200);
if(req.getUsername().equals("user") && req.getPassword().equals("password")){
resp = LoginResponse.newBuilder()
.setSuccess(true)
.setMessage("Login successful")
.build();
ctx.protobuf().send(resp);
} else {
resp = LoginResponse.newBuilder()
.setSuccess(false)
.setMessage("Invalid username/password")
.build();
ctx.protobuf().send(resp);
}
Does my work look good? I think this may solve #407 as well, as you said
I will do an evaluation and I will come with a response. Thanks!