mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 20:51:00 +01:00
Make more URLs parsed, most notably FileTransferRequest::url
Trying to gradually replace the use of strings with better types in ways that makes sense.
This commit is contained in:
parent
72a548ed6a
commit
3e86d75c9d
12 changed files with 35 additions and 32 deletions
|
|
@ -25,7 +25,7 @@ static void downloadToSink(
|
|||
std::string sha256Expected,
|
||||
size_t sizeExpected)
|
||||
{
|
||||
FileTransferRequest request(url);
|
||||
FileTransferRequest request(parseURL(url));
|
||||
Headers headers;
|
||||
if (authHeader.has_value())
|
||||
headers.push_back({"Authorization", *authHeader});
|
||||
|
|
@ -207,7 +207,7 @@ std::vector<nlohmann::json> Fetch::fetchUrls(const std::vector<Pointer> & pointe
|
|||
auto api = lfs::getLfsApi(this->url);
|
||||
auto url = api.endpoint + "/objects/batch";
|
||||
const auto & authHeader = api.authHeader;
|
||||
FileTransferRequest request(url);
|
||||
FileTransferRequest request(parseURL(url));
|
||||
request.post = true;
|
||||
Headers headers;
|
||||
if (authHeader.has_value())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue