www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18851] New: std.net.curl.post cannot be used with !ubyte

https://issues.dlang.org/show_bug.cgi?id=18851

          Issue ID: 18851
           Summary: std.net.curl.post cannot be used with !ubyte
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: tech.vindex gmail.com

In file 'curl.d':

T[] post(T = char)(const(char)[] url, string[string] postDict, HTTP conn =
HTTP())
if (is(T == char) || is(T == ubyte)) //ignoring
{
    import std.uri : urlEncode;

    return post(url, urlEncode(postDict), conn); //post!char by default
}


Correctly:

T[] post(T = char)(const(char)[] url, string[string] postDict, HTTP conn =
HTTP())
if (is(T == char) || is(T == ubyte))
{
    import std.uri : urlEncode;

    return post!T(url, urlEncode(postDict), conn);
}

--
May 10 2018