case 4447
This commit is contained in:
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@@ -10,7 +10,7 @@
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/bin/Debug/net5.0/contact.dll",
|
||||
"program": "${workspaceFolder}/bin/Debug/net6.0/contact.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"stopAtEntry": false,
|
||||
@@ -20,7 +20,7 @@
|
||||
"args": "${auto-detect-url}",
|
||||
"windows": {
|
||||
"command": "cmd.exe",
|
||||
"args": "/C start http://localhost:3002/contact"
|
||||
"args": "/C start http://localhost:3002/request"
|
||||
},
|
||||
"osx": {
|
||||
"command": "open"
|
||||
|
||||
@@ -97,12 +97,53 @@ namespace contact.Pages
|
||||
}
|
||||
}
|
||||
|
||||
PostRequestToSockeye();
|
||||
SendMail();
|
||||
|
||||
skipspam:
|
||||
return Redirect("https://ayanova.com/docs/ay-evaluate/");
|
||||
}
|
||||
|
||||
private void PostRequestToSockeye()
|
||||
{
|
||||
|
||||
using var client = new HttpClient();
|
||||
//client.BaseAddress = new System.Uri("https://sockeye.ayanova.com");///api/v8.0/subscription-server/
|
||||
|
||||
var r = new
|
||||
{
|
||||
dataCenter = SubRequest.DataCenter,
|
||||
email = SubRequest.Email,
|
||||
company = SubRequest.Company,
|
||||
name = SubRequest.Name,
|
||||
rValue = "totallylegit"
|
||||
};
|
||||
|
||||
|
||||
HttpContent body = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(r),
|
||||
System.Text.Encoding.UTF8,
|
||||
"application/json");
|
||||
var response = client.PostAsync("https://sockeye.ayanova.com/subscription-server-trial-request", body).Result;
|
||||
//var response = client.PostAsync("http://localhost:7676/subscription-server-trial-request", body).Result;
|
||||
|
||||
// if (response.IsSuccessStatusCode)
|
||||
// {
|
||||
// var content = await response.Content.ReadAsStringAsync();
|
||||
// if (!string.IsNullOrEmpty(content))
|
||||
// {
|
||||
// var objDeserializeObject = JsonConvert.DeserializeObject<SongsModel>(content);
|
||||
|
||||
// Console.WriteLine("Data Saved Successfully.");
|
||||
|
||||
// if (objDeserializeObject != null)
|
||||
// {
|
||||
// Console.WriteLine(objDeserializeObject.Name);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void SendMail()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
5
notes
5
notes
@@ -26,4 +26,7 @@ copy up to server
|
||||
, then to restart the service do this:
|
||||
systemctl status kestrel-contact.service
|
||||
systemctl start kestrel-contact.service
|
||||
systemctl stop kestrel-contact.service
|
||||
systemctl stop kestrel-contact.service
|
||||
|
||||
|
||||
|
||||
|
||||
11
rest-test.http
Normal file
11
rest-test.http
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
POST https://sockeye.ayanova.com/subscription-server-trial-request HTTP/1.1
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"dataCenter":"SubRequest.DataCenter",
|
||||
"email":"SubRequest.Email",
|
||||
"company":"SubRequest.Company",
|
||||
"name":"SubRequest.Name",
|
||||
"rValue":"totallylegit"
|
||||
}
|
||||
Reference in New Issue
Block a user