Issues with httpclient timeout
    
    
    import httpclient
    
    let callav = 
"https://github.com/nim-lang/Nim/blob/devel/tests/arithm/tand.nim";
    var zcli = newHttpClient()
    echo zcli.getContent(callav,timeout = 10000)     # <---- fails
    #echo zcli.getContent(callav)                    # <---- ok
    
    # test102.nim(5, 10) Error: type mismatch: got (HttpClient, string, 
timeout: int literal(10000))
    # but expected one of:
    # proc getContent(client: AsyncHttpClient; url: string): Future[string]
    # proc getContent(url: string; extraHeaders = ""; maxRedirects = 5;
    #                sslContext: SslContext = defaultSSLContext; timeout = -1;
    #                userAgent = defUserAgent; proxy: Proxy = nil): string
    # proc getContent(client: HttpClient; url: string): string
    #
    

Anything I am doing wrong here or can timeout not be set like this ? Latest nim 
devel.

Reply via email to