getUrl() public method

Builds the request url from the options and given params.
public getUrl ( string $path, array $params = [] ) : string
$path string - the path in the url to hit
$params array - query parameters to be encoded into the url
return string $url - the url to send the desired request to
示例#1
0
 public function testGetUrl()
 {
     $url = 'https://api.sparkpost.com:443/api/v1/transmissions?key=value 1,value 2,value 3';
     $testUrl = $this->resource->getUrl('transmissions', ['key' => ['value 1', 'value 2', 'value 3']]);
     $this->assertEquals($url, $testUrl);
 }