code: static HttpRequestBase createHttpRequest(
              Request<?> request, Map<String, String> additionalHeaders) {
          switch (request.getMethod()) {
              case Request.Method.GET:
                  return new HttpGet(request.getUrlString());
              case Request.Method.DELETE:
                  return new HttpDelete(request.getUrlString());
              case Request.Method.POST: {
                  HttpPost postRequest = new HttpPost(request.getUrlString());
                  postRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType());
                  setEntityIfNonEmptyBody(postRequest, request);
                  return postRequest;
              }
              case Request.Method.PUT: {
                  HttpPut putRequest = new HttpPut(request.getUrlString());
                  putRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType());
                  setEntityIfNonEmptyBody(putRequest, request);
                  return putRequest;
              }
              case Request.Method.HEAD:
                  return new HttpHead(request.getUrlString());
              case Request.Method.OPTIONS:
                  return new HttpOptions(request.getUrlString());
              case Request.Method.TRACE:
                  return new HttpTrace(request.getUrlString());
              case Request.Method.PATCH: {
                  HttpPatch patchRequest = new HttpPatch(request.getUrlString());
                  patchRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType());
                  setEntityIfNonEmptyBody(patchRequest, request);
                  return patchRequest;
              }
              default:
                  throw new IllegalStateException("Unknown request method.");
          }
      }
docs: Creates the appropriate subclass of HttpUriRequest for passed in request.