package jp.satorufujiwara.http;

import java.util.HashMap;
import java.util.Map;

public class Request {

    private String url;
    private String method;
    private Map<String, String> headers;
    private RequestBody body;

    Request(Builder builder) {
        this.url = builder.url;
        this.method = builder.method;
        this.headers = builder.headers;
        this.body = builder.body;
    }

    public String getUrl() {
        return url;
    }

    public Map<String, String> getHeaders() {
        return headers;
    }

    public String getMethod() {
        return method;
    }

    public RequestBody getBody() {
        return body;
    }

    public static class Builder {

        private String url;
        private String method;
        private Map<String, String> headers;
        private RequestBody body;

        public Builder() {
            method = "GET";
            headers = new HashMap<>();
        }

        public Builder url(String url) {
            this.url = url;
            return this;
        }

        public Builder method(String method, RequestBody body) {
            this.method = method;
            this.body = body;
            return this;
        }

        public Request build() {
            return new Request(this);
        }
    }
}

@@ -1038,32 +1038,654 @@
 his;%0A        %7D%0A%0A
+        public Builder get() %7B%0A            return method(%22GET%22, null);%0A        %7D%0A%0A        public Builder post(RequestBody body) %7B%0A            return method(%22POST%22, body);%0A        %7D%0A%0A        public Builder delete(RequestBody body) %7B%0A            return method(%22DELETE%22, body);%0A        %7D%0A%0A        public Builder put(RequestBody body) %7B%0A            return method(%22PUT%22, body);%0A        %7D%0A%0A        public Builder patch(RequestBody body) %7B%0A            return method(%22PATCH%22, body);%0A        %7D%0A%0A        public Builder addHeader(String name, String value) %7B%0A            headers.put(name, value);%0A            return this;%0A        %7D%0A%0A
         public B

Add methods.