http注释
This commit is contained in:
@@ -87,8 +87,6 @@ namespace WMS.Web.Core.Help
|
||||
|
||||
public string PostHttp(string url, LoginAuthorizeRequest reqData)
|
||||
{
|
||||
_logger.LogInformation($"HttpPost->11111111111111111");
|
||||
|
||||
var str = string.Format("client_id={0}&client_secret={1}&grant_type={2}&username={3}&password={4}&scope={5}",
|
||||
reqData.ClientId, reqData.ClientSecret, reqData.GrantType, reqData.UserName, reqData.Password,reqData.Scope);
|
||||
ASCIIEncoding encoding = new ASCIIEncoding();
|
||||
@@ -101,19 +99,16 @@ namespace WMS.Web.Core.Help
|
||||
HttpClient httpClient = new HttpClient();
|
||||
httpClient.BaseAddress = new Uri(url);
|
||||
httpClient.Timeout = new TimeSpan(0, 0, 10);
|
||||
_logger.LogInformation($"HttpPost-2>"+ str);
|
||||
HttpResponseMessage response = httpClient.PostAsync(url, httpContent).Result;
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
var resData = response.Content.ReadAsStringAsync().Result;
|
||||
_logger.LogInformation($"HttpPost-3>" + resData);
|
||||
return resData;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var resData = response.Content.ReadAsStringAsync().Result;
|
||||
_logger.LogInformation($"HttpPost-4>" + resData);
|
||||
return resData;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user