Skip to content

Conversation

denysvitali
Copy link

No description provided.

@coveralls
Copy link

@decebals
Copy link
Member

decebals commented Jun 5, 2019

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.

@denysvitali
Copy link
Author

Does my work look good? I think this may solve #407 as well, as you said 👍

@denysvitali
Copy link
Author

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);
}

@decebals
Copy link
Member

decebals commented Jun 5, 2019

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants