public static Parameter<String> decodeForm(String s, Charset charset) {
        int idx = s.indexOf("=");
        try {
            if (idx < 0) {
                return Parameter.of("", URLDecoder.decode(s, charset.name()));
            }
            return Parameter.of(URLDecoder.decode(s.substring(0, idx), charset.name()),
                    URLDecoder.decode(s.substring(idx + 1), charset.name()));
        } catch (UnsupportedEncodingException e) {
            // should not happen
            throw new RequestsException(e);
        }
    }
public static Parameter < String > decodeForm ( String s , Charset charset ) { int idx = s . indexOf ( "=" ) ; try { if ( idx < 0 ) { return Parameter . of ( "" , URLDecoder . decode ( s , charset . name ( ) ) ) ; } return Parameter . of ( URLDecoder . decode ( s . substring ( 0 , idx ) , charset . name ( ) ) , URLDecoder . decode ( s . substring ( idx + 1 ) , charset . name ( ) ) ) ; } catch ( UnsupportedEncodingException e ) { throw new RequestsException ( e ) ; } }
Decode key-value query parameter