bhavish
bhavish
Explore posts from servers
CC#
Created by bhavish on 1/21/2025 in #help
✅ Request error: The SSL connection could not be established, see inner exception.
using System.Text;

var client = new HttpClient();

// Set up the request
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://<my-domain>.azurewebsites.net/company/products/notifier/email"),
Content = new StringContent(
@"{
""fromMail"": ""[email protected]"",
""fromName"": ""IHRM-Team"",
""to"": [""[email protected]""],
""subject"": ""some message"",
""templateId"": ""d-401bd3782f974c1da24db450f5f1eb86"",
""props"": {
""name"": ""GUS""
}
}",
Encoding.UTF8,
"application/json"
)
};

// Set headers
request.Headers.Add("accept", "*/*");

try
{
// Send the request
var response = await client.SendAsync(request);

// Ensure the response indicates success
response.EnsureSuccessStatusCode();

// Print the response content
var responseContent = await response.Content.ReadAsStringAsync();
Console.WriteLine($"Response: {responseContent}");
}
catch (HttpRequestException e)
{
Console.WriteLine($"Request error: {e.Message}");
}
using System.Text;

var client = new HttpClient();

// Set up the request
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://<my-domain>.azurewebsites.net/company/products/notifier/email"),
Content = new StringContent(
@"{
""fromMail"": ""[email protected]"",
""fromName"": ""IHRM-Team"",
""to"": [""[email protected]""],
""subject"": ""some message"",
""templateId"": ""d-401bd3782f974c1da24db450f5f1eb86"",
""props"": {
""name"": ""GUS""
}
}",
Encoding.UTF8,
"application/json"
)
};

// Set headers
request.Headers.Add("accept", "*/*");

try
{
// Send the request
var response = await client.SendAsync(request);

// Ensure the response indicates success
response.EnsureSuccessStatusCode();

// Print the response content
var responseContent = await response.Content.ReadAsStringAsync();
Console.WriteLine($"Response: {responseContent}");
}
catch (HttpRequestException e)
{
Console.WriteLine($"Request error: {e.Message}");
}
I am using a mail sender API which is working in other language scripts and postman but not in C#. and giving the above mentioned error
63 replies
CDCloudflare Developers
Created by bhavish on 6/19/2024 in #general-help
how to deploy an existing remix : vite project on cloudflare pages?
I was looking for any tutorials that might help me do this but they all are using a predefined template https://developers.cloudflare.com/pages/framework-guides/deploy-a-remix-site/ How to convert an existing remix app so that it can be easily deployed over cloudflare pages here is the repo https://github.com/sBhavish/Portfolio
10 replies