Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Response {
- private String status;
- private String body;
- private Map<String, String> headers;
- private Response() {
- }
- public String status() {
- return status;
- }
- public Map<String, String> headers() {
- return headers;
- }
- public String body() {
- return body;
- }
- public static class Builder {
- private Response response;
- private String status;
- private String body;
- private Map<String, String> headers;
- public Builder() {
- this.response = new Response();
- }
- public Builder withStatus(String status) {
- this.status = status;
- return this;
- }
- public Builder withBody(String body) {
- this.body = body;
- return this;
- }
- public Builder withHeaders(Map<String, String> headers) {
- this.headers = headers;
- return this;
- }
- public Response build() {
- response.status = this.status;
- response.headers = this.headers;
- response.body = this.body;
- return response;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement