std.net.curl seems to cause various issues in this case, and it is probably easier to interface with curl directly.