Skip to content

Commit

Permalink
Allow byte arrays in response bodies.
Browse files Browse the repository at this point in the history
  • Loading branch information
noboomu committed Jan 16, 2020
1 parent e1a7de4 commit fb8229f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@ public ServerResponse<T> body(ByteBuffer body)
return this;
}

public ServerResponse<T> body(byte[] body)
{
this.body = ByteBuffer.wrap(body);
this.preprocessed = true;
return this;
}

public ServerResponse<T> body(String body)
{
return this.body(ByteBuffer.wrap(body.getBytes()));
Expand Down

0 comments on commit fb8229f

Please sign in to comment.