Cleanup network module.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Cryville.Common.Network;
|
||||
using Cryville.Common.Network.Http11;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
@@ -123,13 +123,13 @@ namespace Cryville.Crtr {
|
||||
try {
|
||||
switch (p[0]) {
|
||||
case "!http":
|
||||
var httpcl = new HttpClient(new Uri(p[1]));
|
||||
var httpcl = new Http11Client(new Uri(p[1]));
|
||||
httpcl.Connect();
|
||||
httpcl.Request("GET", new Uri(p[1])).MessageBody.ReadToEnd();
|
||||
httpcl.Close();
|
||||
break;
|
||||
case "!https":
|
||||
var httpscl = new HttpsClient(new Uri(p[1]));
|
||||
var httpscl = new Https11Client(new Uri(p[1]));
|
||||
httpscl.Connect();
|
||||
httpscl.Request("GET", new Uri(p[1])).MessageBody.ReadToEnd();
|
||||
httpscl.Close();
|
||||
|
@@ -1,4 +1,4 @@
|
||||
using Cryville.Common.Network;
|
||||
using Cryville.Common.Network.Http11;
|
||||
using Cryville.Common.Unity;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
@@ -21,7 +21,7 @@ namespace Cryville.Crtr.Network {
|
||||
List<VersionInfo> _versions;
|
||||
public void CheckVersion() {
|
||||
try {
|
||||
var client = new HttpsClient(BaseUri);
|
||||
var client = new Https11Client(BaseUri);
|
||||
client.Connect();
|
||||
var response = client.Request("GET", new Uri(BaseUri, "versions"));
|
||||
var data = Encoding.UTF8.GetString(response.MessageBody.ReadToEnd());
|
||||
|
Reference in New Issue
Block a user