试图获取日期列表,我需要在 URL 之间添加 2 个字符串
- 无法正确连接 URL
需要帮助反序列化为 DateTime 列表
public async Task<List<DateTime>>GetDate() { // Original Url http://local:8796550/serv/newobj/v678/object/35b724c5424/serv/addIDinhere/dates . List<DateTime> dates = new List<DateTime>(); var Id= "xxxxxxxxxxxxxxhola57a"; var Uri = "http://local:8796550/serv/newobj/v678/object/35b724c5424/serv/"; var Date="/dates"; var client = new HttpClient(); var ServicesDateRequest = await client.GetAsync($"{Uri}&={Id}&={Date}"); string oj = await ServicesDateRequest.Content.ReadAsStringAsync(); //here deserialized it into datetime list var DatesJson = JsonConvert.DeserializeObject<dates>(oj); return dates; }