code: public static HttpURLConnection retrieveMessages(final URI uri, final QueueRequestOptions queueOptions,
              final OperationContext opContext, final int numberOfMessages, final int visibilityTimeoutInSeconds)
              throws URISyntaxException, IOException, StorageException {
  
          final UriQueryBuilder builder = new UriQueryBuilder();
  
          if (numberOfMessages != 0) {
              builder.add(NUMBER_OF_MESSAGES, Integer.toString(numberOfMessages));
          }
  
          builder.add(VISIBILITY_TIMEOUT, Integer.toString(visibilityTimeoutInSeconds));
  
          final HttpURLConnection request = BaseRequest.createURLConnection(uri, queueOptions, builder, opContext);
  
          request.setRequestMethod("GET");
  
          return request;
      }
docs: Constructs a web request to retrieve messages from the front of the
  queue. Sign the web request with a length of -1L.
  
  @param uri
  A <code>URI</code> object that specifies the absolute URI to
  the queue.
  @param queueOptions
  A {@link QueueRequestOptions} object that specifies execution options such as retry policy and timeout
  settings for the operation. Specify <code>null</code> to use the request options specified on the
  {@link CloudQueueClient}.
  @param opContext
  An {@link OperationContext} object that represents the context
  for the current operation. This object is used to track
  requests to the storage service, and to provide additional
  runtime information about the operation.
  @param numberOfMessages
  A nonzero value that specifies the number of messages to
  retrieve from the queue, up to a maximum of 32.
  @param visibilityTimeoutInSeconds
  Specifies the visibility timeout value in seconds, relative to
  server time, to make the retrieved messages invisible until
  the visibility timeout expires. The value must be larger than
  or equal to 0, and cannot be larger than 7 days. The
  visibility timeout of a message can be set to a value later
  than the expiry time, which will prevent the message from
  being retrieved again whether it is processed or not.
  @return An <code>HttpURLConnection</code> configured for the specified
  operation.
  
  @throws IOException
  @throws URISyntaxException
  If the URI is not valid.
  @throws StorageException
  If a storage service error occurred during the operation.