|
@@ -650,7 +650,11 @@ namespace GxPress.Repository.Implement
|
|
|
{
|
|
|
var imServiceUrl = ConfigHelper.GetValue("ServiceAddress:ImUrl");
|
|
|
// var httpClientHandler = new HttpClientHandler { ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator };
|
|
|
- HttpClient httpClient = new HttpClient(); //http对象
|
|
|
+ var httpClientHandler = new HttpClientHandler
|
|
|
+ {
|
|
|
+ ServerCertificateCustomValidationCallback = (message, certificate2, arg3, arg4) => true
|
|
|
+ };
|
|
|
+ HttpClient httpClient = new HttpClient(httpClientHandler); //http对象
|
|
|
HttpResponseMessage response = await httpClient.PostAsync(
|
|
|
$"{imServiceUrl}/users",
|
|
|
new JsonContent(new { username = request.Phone, password = "123456", nickname = request.Name }));
|