Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

simple http request c#

using System.Net;

var url = "http://webcode.me";

var request = WebRequest.Create(url);
request.Method = "GET";

using var webResponse = request.GetResponse();
using var webStream = webResponse.GetResponseStream();

using var reader = new StreamReader(webStream);
var data = reader.ReadToEnd();

Console.WriteLine(data);
Comment

PREVIOUS NEXT
Code Example
Csharp :: when was the third world war 
Csharp :: c# convert int to string 
Csharp :: c# save pdf to folder 
Csharp :: c# get char from string 
Csharp :: change dot net core web api routing 
Csharp :: how to store an array inside an array c# 
Csharp :: unity actions 
Csharp :: how to create a delegate in c# 
Csharp :: unity new vector3 
Csharp :: get value from config file c# 
Csharp :: c# for loop next iteration 
Csharp :: raycasting in unity 
Csharp :: csharp datagridview filter column 
Csharp :: how to check that string has only alphabet in c# 
Csharp :: Operator Overloading | C# 
Csharp :: get index c# 
Csharp :: array join c# 
Csharp :: C# how to use if and else 
Csharp :: how to create empty text file in c# 
Csharp :: raycasthit unity 
Csharp :: new ienumerable 
Csharp :: lcm of numbers 
Csharp :: aspx import namespace 
Csharp :: postasjsonasync reference c# 
Csharp :: .net core web app get dll name 
Csharp :: how to convert object in string JSON c# 
Csharp :: c# today without time 
Csharp :: how to check if the value is alphabet and numbers only only in c# 
Csharp :: unity reference textmeshpro 
Csharp :: c# list.foreach 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =