class RequestBuilderImpl implements RequestBuilder {

    @Override
    public RequestBuilder body(Consumer<RequestBodyBuilder> bodyProducer) {
        if (multipartBuilder != null) {
            throw new IllegalStateException("A normal body cannot be added to a multipart request");
        }
        if (getBody() != null) {
            throw new IllegalStateException("A request can only have a single body");
        }

        RequestBodyBuilderImpl bodyBuilder = new RequestBodyBuilderImpl(mapper);
        bodyProducer.accept(bodyBuilder);

        body = bodyBuilder.getBody();
        return this;
    }

    public  RequestBuilderImpl(ObjectMapper mapper);

}