mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-13 20:06:43 +00:00
Fix #675: Use paths with leading slashes
This commit is contained in:
@@ -3,10 +3,10 @@ require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
use Curl\Curl;
|
||||
|
||||
$curl = new Curl('https://www.example.com/api/');
|
||||
$curl = new Curl('https://www.example.com/');
|
||||
|
||||
// https://www.example.com/api/test?key=value
|
||||
$response = $curl->get('test', [
|
||||
$response = $curl->get('/api/test', [
|
||||
'key' => 'value',
|
||||
]);
|
||||
assert($curl->url === 'https://www.example.com/api/test?key=value');
|
||||
|
||||
Reference in New Issue
Block a user