code: public static String getParameter(HttpRequest request, String name) throws URISyntaxException {
          NameValuePair nv = URLEncodedUtils.parse(new URI(request.getRequestLine().getUri()), "UTF-8").stream()
              .filter(param -> param.getName().equals(name))
              .findFirst().get();
          if (nv == null) {
              return null;
          }
          return nv.getValue();
      }
docs: Gets parameter value of request line.
  
  @param request HTTP request
  @param name    name of the request line parameter
  
  @return parameter value, only the first is returned if there are multiple values for the same name
  
  @throws URISyntaxException in case of URL issue