Minor improvements
- WebFinger: detect when to use http or https, better function naming - RequestPool: add user agent
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user