<?php

declare (strict_types=1);
namespace GDAVSCOPE\Amp\Http\Client\Interceptor;

use GDAVSCOPE\Amp\Http\Client\Request;
use GDAVSCOPE\League\Uri\Http;
final class ResolveBaseUri extends ModifyRequest
{
    public function __construct(string $baseUri)
    {
        parent::__construct(fn(Request $request) => $request->setUri(Http::fromBaseUri($request->getUri(), $baseUri)));
    }
}
