public static function encodeURI($url)
    {
        $unescaped = array(
            '%2D'=>'-','%5F'=>'_','%2E'=>'.','%21'=>'!', '%7E'=>'~',
            '%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')'
        );
        $reserved = array(
            '%3B'=>';','%2C'=>',','%2F'=>'/','%3F'=>'?','%3A'=>':',
            '%40'=>'@','%26'=>'&','%3D'=>'=','%2B'=>'+','%24'=>'$'
        );
        $score = array(
            '%23'=>'#'
        );
        return strtr(rawurlencode($url), array_merge($reserved, $unescaped, $score));
    }
public static function encodeURI($url)
    {
        $unescaped = array(
            '%2D'=>'-','%5F'=>'_','%2E'=>'.','%21'=>'!', '%7E'=>'~',
            '%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')'
        );
        $reserved = array(
            '%3B'=>';','%2C'=>',','%2F'=>'/','%3F'=>'?','%3A'=>':',
            '%40'=>'@','%26'=>'&','%3D'=>'=','%2B'=>'+','%24'=>'$'
        );
        $score = array(
            '%23'=>'
        );
        return strtr(rawurlencode($url), array_merge($reserved, $unescaped, $score));
    }
public static function encodeURI ( $ url ) { $ unescaped = array ( '%2D' => '-' , '%5F' => '_' , '%2E' => '.' , '%21' => '!' , '%7E' => '~' , '%2A' => '*' , '%27' => "'" , '%28' => '(' , '%29' => ')' ) ; $ reserved = array ( '%3B' => ';' , '%2C' => ',' , '%2F' => '/' , '%3F' => '?' , '%3A' => ':' , '%40' => '@' , '%26' => '&' , '%3D' => '=' , '%2B' => '+' , '%24' => '$' ) ; $ score = array ( '%23' => '#' ) ; return strtr ( rawurlencode ( $ url ) , array_merge ( $ reserved , $ unescaped , $ score ) ) ; }
GuzzleHttp\Psr\Uri use `parse_url`，not good for utf-8,
So should `encodeURI` first, before `new Psr7\Request`
@see http://stackoverflow.com/questions/4929584/encodeuri-in-php
GuzzleHttp \ Psr \ Uri use parse_url ，not good for utf - 8 So should encodeURI first before new Psr7 \ Request