niv / websocket.nim

websockets for nim
http://niv.github.io/websocket.nim/docs/0.1.1/websocket.html
Other
101 stars 25 forks source link

type mismatch: got <userAgent: string, sslContext: SslContext> #63

Closed kidandcat closed 4 years ago

kidandcat commented 4 years ago

Running the client example:

Nim Compiler Version 1.0.99 [Windows: amd64] Compiled at 2019-10-18 Copyright (c) 2006-2019 by Andreas Rumpf

git hash: 832b0a0232e610c1935aaf6ce0b45f69199f8a19 active boot switches: -d:release

C:\Users\jairo\.nimble\pkgs\websocket-0.4.0\websocket\client.nim(106, 34) Error: type mismatch: got <userAgent: string, sslContext: SslContext>
but expected one of:
proc newAsyncHttpClient(userAgent = defUserAgent; maxRedirects = 5;
                       sslContext = getDefaultSSL(); proxy: Proxy = nil): AsyncHttpClient
  first type mismatch at position: 2
  required type for sslContext: SSLContext
  but expression 'sslContext = sslContext' is of type: SslContext

expression: newAsyncHttpClient(userAgent = userAgent, sslContext = sslContext)
metagn commented 4 years ago

see #62 (made a new release so you can just do nimble install websocket)