{"action":"created","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/7778","repository_url":"https://api.github.com/repos/nim-lang/Nim","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/7778/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/7778/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/7778/events","html_url":"https://github.com/nim-lang/Nim/issues/7778","id":320514928,"number":7778,"title":"required type: HttpClient but expression 'client' is of type: HttpClient","user":{"login":"Imperator26","id":20555025,"avatar_url":"https://avatars3.githubusercontent.com/u/20555025?v=4","gravatar_id":"","url":"https://api.github.com/users/Imperator26","html_url":"https://github.com/Imperator26","followers_url":"https://api.github.com/users/Imperator26/followers","following_url":"https://api.github.com/users/Imperator26/following{/other_user}","gists_url":"https://api.github.com/users/Imperator26/gists{/gist_id}","starred_url":"https://api.github.com/users/Imperator26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Imperator26/subscriptions","organizations_url":"https://api.github.com/users/Imperator26/orgs","repos_url":"https://api.github.com/users/Imperator26/repos","events_url":"https://api.github.com/users/Imperator26/events{/privacy}","received_events_url":"https://api.github.com/users/Imperator26/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-05T14:47:13Z","updated_at":"2018-05-05T17:29:05Z","closed_at":null,"author_association":"NONE","body":"code:\r\n`let response = client.post(url=endpoint, extraHeaders=header, multipart=payload)`\r\n\r\n```\r\nError: type mismatch: got <HttpClient, url: string, extraHeaders: string, multipart: MultipartData>\r\nbut expected one of: \r\nproc post(url: string; extraHeaders = \"\"; body = \"\"; maxRedirects = 5;\r\n         sslContext: SSLContext = defaultSSLContext; timeout = -1;\r\n         userAgent = defUserAgent; proxy: Proxy = nil; multipart: MultipartData = nil): Response\r\n  first type mismatch at position: 1\r\n  required type: string\r\n  but expression 'client' is of type: HttpClient\r\nproc post(client: HttpClient; url: string; body = \"\"; multipart: MultipartData = nil): Response\r\n  first type mismatch at position: 1\r\n  required type: HttpClient\r\n  but expression 'client' is of type: HttpClient\r\nproc post(client: AsyncHttpClient; url: string; body = \"\";\r\n         multipart: MultipartData = nil): Future[AsyncResponse]\r\n  first type mismatch at position: 1\r\n  required type: AsyncHttpClient\r\n  but expression 'client' is of type: HttpClient\r\n\r\nexpression: post(client, url = endpoint, extraHeaders = header, multipart = payload)\r\n```"},"comment":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/comments/386821852","html_url":"https://github.com/nim-lang/Nim/issues/7778#issuecomment-386821852","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/7778","id":386821852,"user":{"login":"dom96","id":246651,"avatar_url":"https://avatars0.githubusercontent.com/u/246651?v=4","gravatar_id":"","url":"https://api.github.com/users/dom96","html_url":"https://github.com/dom96","followers_url":"https://api.github.com/users/dom96/followers","following_url":"https://api.github.com/users/dom96/following{/other_user}","gists_url":"https://api.github.com/users/dom96/gists{/gist_id}","starred_url":"https://api.github.com/users/dom96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dom96/subscriptions","organizations_url":"https://api.github.com/users/dom96/orgs","repos_url":"https://api.github.com/users/dom96/repos","events_url":"https://api.github.com/users/dom96/events{/privacy}","received_events_url":"https://api.github.com/users/dom96/received_events","type":"User","site_admin":false},"created_at":"2018-05-05T17:29:05Z","updated_at":"2018-05-05T17:29:05Z","author_association":"OWNER","body":"Actually this looks wrong to me:\r\n\r\n> ```\r\n> proc post(client: HttpClient; url: string; body = \"\"; multipart: MultipartData = nil): Response\r\n>  first type mismatch at position: 1\r\n>  required type: HttpClient\r\n> but expression 'client' is of type: HttpClient\r\n>```\r\n\r\nThe first mismatch there is the ``extraHeaders`` not ``client``."}}
{"actor":{"display_login":"dom96"}}