c# - How to use WebClient with .NetCore? -


is there way use webclient in .net core application? if build application following error:

severity    code    description project file    line error   cs0246  type or namespace name 'webclient' not found (are missing using directive or assembly reference?) 

i think webclient not part of .net core, there alternative?

as @mike z says in comments, webclient isn't in core repo , won't ported. stack overflow question "need deciding between httpclient , webclient" has answers why should using httpclient instead.

one of drawbacks mentioned there no built-in progress reporting in httpclient. however, because using streams, possible write own. answers "how implement progress reporting portable httpclient" provides example reporting progress of response stream.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -