Minor improvements

- WebFinger:  detect when to use http or https, better function naming
- RequestPool: add user agent
This commit is contained in:
2024-02-21 15:39:41 -03:00
parent 166f428cd1
commit 7fbdd031ff
5 changed files with 76 additions and 20 deletions

View File

@@ -1,8 +1,5 @@
module net.request_pool;
import core.thread;
import core.sync.semaphore;
import std.container;
import std.parallelism;
@@ -32,6 +29,7 @@ class RequestPool {
for (int i = 0; i < totalWorkers + 1; i++) {
Request rq = Request();
// TODO: add custom fields (such as user agent)
rq.addHeaders(["User-Agent": "apd (development)"]);
this.m_requests ~= rq;
}
}