code: protected Get generateRequest(
        Optional<String> from, String prefix, RedirectFilter rf, String namespace) {
      RequestBuilder requestBuilder =
          new ApiRequestBuilder() //
              .action("query") //
              .paramNewContinue(bot().getVersion()) //
              .formatXml() //
              .param("list", "allpages") //
              .param("apfilterredir", findRedirectFilterValue(rf)) //
              .param("aplimit", LIMIT) //
          ;
  
      if (from.isPresent()) {
        requestBuilder.param("apfrom", MediaWiki.urlEncode(from.get()));
      }
      if (!Strings.isNullOrEmpty(prefix)) {
        requestBuilder.param("apprefix", MediaWiki.urlEncode(prefix));
      }
      if (!Strings.isNullOrEmpty(namespace)) {
        requestBuilder.param("apnamespace", MediaWiki.urlEncode(namespace));
      }
      return requestBuilder.buildGet();
    }
docs: Generates the next MediaWiki-request (GetMethod) and adds it to msgs.
  
  @param from page title to start from, may be null
  @param prefix restricts search to titles that begin with this value, may be null
  @param rf include redirects in the list
  @param namespace the namespace(s) that will be searched for links, as a string of numbers
  separated by '|'; if null, this parameter is omitted
  @return a