On Saturday, 7 April 2018 at 13:02:39 UTC, Vindex wrote:
There is an error on some sites when using HTTP-methods
(std.net.curl.get, std.net.curl.post):
std.encoding.EncodingException@std/encoding.d(2505):
Unrecognized Encoding: utf8
Is there a beautiful way around it?
For the GET-method I use the download() and readText(). But for
the POST-method I can not come up with an alternative solution.
That's weird. std.net.curl should be able to handle UTF-8.
What content are you trying to download/post?
Maybe you can open a bug report for it?
In any case, you might want to checkout requests:
https://github.com/ikod/dlang-requests
It's by far more convenient to use than std.net.curl