Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
public async Task<StockData>PostStockInfo(StockType stockType, Dictionary<string, string> sparams, string fields = "")
{
string Url = "https://api.tushare.pro";
string Token = "xxxxxxxx";
StockPara para = new StockPara();
para.api_name = stockType.ToString();
para.token = Token;
para.Params = sparams;
para.fields = fields;
var json = JsonConvert.SerializeObject(para);
var data = new StringContent(json, Encoding.UTF8, "application/json");
using (HttpResponseMessage response = await APIHelper.ApiClient.PostAsync(Url, data))
{
if (response.IsSuccessStatusCode)
{
var msg = await response.Content.ReadAsAsync<StockAllInfo>();
return msg.data;
}
else
{
throw new Exception(response.ReasonPhrase);
}
}
}
if I run the same method in a winform application, I can get the right data, but if I run the service in an abp application,I got a wrong msg. I guess this is because in my api invoked an third party api,
and the crossDomain is not allowed,but I don't know how to set allow crossDomain in abp? any idea? thanks a lot.
I write a service in abp application like this:
if I run the same method in a winform application, I can get the right data, but if I run the service in an abp application,I got a wrong msg. I guess this is because in my api invoked an third party api, and the crossDomain is not allowed,but I don't know how to set allow crossDomain in abp? any idea? thanks a lot.