Add unix socket support

This commit is contained in:
2025-05-27 10:51:21 -05:00
parent 9da9a5d8c0
commit 62111cd42e
8 changed files with 211 additions and 18 deletions

View File

@ -8,11 +8,20 @@ int main(int argc, char** argv)
if(argc < 3)
{
printf("USAGE: %s <url> <path>\n",argv[0]);
printf("USAGE: %s <unixSocket> <url> <path>\n",argv[0]);
return 1;
}
std::string path = argv[2];
Tesses::Framework::Http::DownloadToFileSimple(argv[1],path);
if(argc >= 4)
{
std::string unixSocket = argv[1];
std::string url = argv[2];
std::string path = argv[3];
Tesses::Framework::Http::DownloadUnixSocketToFileSimple(unixSocket,url,path);
}
else {
std::string path = argv[2];
Tesses::Framework::Http::DownloadToFileSimple(argv[1],path);
}
return 0;
}