【发布时间】:2019-07-04 09:38:41
【问题描述】:
我正在尝试使用 Flurl 调用 api,这是我的请求,它只在我的测试服务器上失败,但也适用于实时服务器和本地主机
PickUp responseAsPickUpPointServiceResponse = null;
try
{
responseAsPickUpPointServiceResponse =
await new Flurl.Url(_baseUrl + "/rest//v1/servicepoint/findByPostalCode.json")
.SetQueryParam("apikey", APIKEY_WEB1)
.SetQueryParam("countryCode", countrycode)
.SetQueryParam("postalCode", zipcode)
.WithHeader("Accept", "application/json;charset=UTF-8")
.GetJsonAsync<PickUp>();
}
但它失败并出现错误
找不到方法:'System.Threading.Tasks.Task`1 Flurl.Http.GeneratedExtensions.GetJsonAsync(Flurl.Http.IFlurlRequest, System.Threading.CancellationToken, System.Net.Http.HttpCompletionOption)强>
有人知道如何解决这个问题吗?
【问题讨论】:
-
你知道如何解决这个问题吗?
-
@jorgeACacon 很遗憾没有
-
每次构建应用程序后我都必须执行 iisreset...