case 4447
This commit is contained in:
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@@ -10,7 +10,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"preLaunchTask": "build",
|
"preLaunchTask": "build",
|
||||||
// If you have changed target frameworks, make sure to update the program path.
|
// 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": [],
|
"args": [],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"args": "${auto-detect-url}",
|
"args": "${auto-detect-url}",
|
||||||
"windows": {
|
"windows": {
|
||||||
"command": "cmd.exe",
|
"command": "cmd.exe",
|
||||||
"args": "/C start http://localhost:3002/contact"
|
"args": "/C start http://localhost:3002/request"
|
||||||
},
|
},
|
||||||
"osx": {
|
"osx": {
|
||||||
"command": "open"
|
"command": "open"
|
||||||
|
|||||||
@@ -97,12 +97,53 @@ namespace contact.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PostRequestToSockeye();
|
||||||
SendMail();
|
SendMail();
|
||||||
|
|
||||||
skipspam:
|
skipspam:
|
||||||
return Redirect("https://ayanova.com/docs/ay-evaluate/");
|
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()
|
private void SendMail()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
3
notes
3
notes
@@ -27,3 +27,6 @@ copy up to server
|
|||||||
systemctl status kestrel-contact.service
|
systemctl status kestrel-contact.service
|
||||||
systemctl start 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