Hello @purplepixie !
Being worked on lately, a new transport has been proposed for DNS messages, that being HTTP.
As your library interacts with DNS, it would be nice to add the format specified in the current IETF draft, on the way to become RFC, in version 05 ATM -> https://tools.ietf.org/html/draft-ietf-doh-dns-over-https-05
It is easy on your side, I believe.
Otherwise I will have a look at the code and propose something, after your reply!
Best regards,
Massimiliano Fantuzzi