code: public static HttpURLConnection toHttpConnection(RequestBatch requests) {
  
          URL url = null;
          try {
              if (requests.size() == 1) {
                  // Single request case.
                  Request request = requests.get(0);
                  // In the non-batch case, the URL we use really is the same one returned by getUrlForSingleRequest.
                  url = new URL(request.getUrlForSingleRequest());
              } else {
                  // Batch case -- URL is just the graph API base, individual request URLs are serialized
                  // as relative_url parameters within each batch entry.
                  url = new URL(ServerProtocol.getGraphUrlBase());
              }
          } catch (MalformedURLException e) {
              throw new FacebookException("could not construct URL for request", e);
          }
  
          HttpURLConnection connection;
          try {
              connection = createConnection(url);
  
              serializeToUrlConnection(requests, connection);
          } catch (IOException e) {
              throw new FacebookException("could not construct request body", e);
          } catch (JSONException e) {
              throw new FacebookException("could not construct request body", e);
          }
  
          return connection;
      }
docs: Serializes one or more requests but does not execute them. The resulting HttpURLConnection can be executed
  explicitly by the caller.
  
  @param requests
  a RequestBatch to serialize
  @return an HttpURLConnection which is ready to execute
  
  @throws FacebookException
  If any of the requests in the batch are badly constructed or if there are problems
  contacting the service
  @throws IllegalArgumentException