Dim wc = New System.Net.WebClient
Dim apistring = wc.DownloadString("https://www.coinexchange.io/api/v1/getmarketsummaries")
Some websites will not respond to a plain HTTP Request that contain only the
Host header. They require additional common headers that typically would be set when being originated in a web browser.
Most commonly when a WebClient request fails the server is looking for the
User-Agent or the
Accept header. The server may rely on these headers to determine how to output the Response to client. A typical example is when an API looks at the
Depending on the site it might also look for
Trying a combination of those values based on what your browser produces.
For this particular website, the browser sends:
The header this site is looking for is the
User-Agent header. If it is not present it closes the connection and returns no response.