我对编码还比较陌生,对此我一头雾水,我有一个类似的东西似乎可以工作,那就是:
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddHttpContextAccessor(); // does pretty much the same as above
}
但是由于某种原因,下面的那个不想为我工作:
Alamofire.request(_pokemonURL).responseJSON { response in
if let dict = response.result.value as? Dictionary<String, AnyObject> {
if let name = dict["name"] as? String {
self._name = name
}
任何人都可以帮忙吗?