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 ( ) ; }
Gets parameter value of request line .