-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransport.cs
More file actions
32 lines (29 loc) · 809 Bytes
/
Transport.cs
File metadata and controls
32 lines (29 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using System.Net.Http;
namespace MicroFocus_Scanner
{
//Took a different approach, didn't use this
class Transport
{
String URL;
public Transport(String url)
{
this.URL = url ;
}
public async Task ConnectAsync(String message)
{
HttpClient client = new HttpClient();
HttpResponseMessage result = await client.GetAsync(this.URL);
if (result.IsSuccessStatusCode)
{
String content = await result.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}
}
}