更新请求目标名称和地址

时间:2017-08-04 15:24:29

标签: uber-api

我正在尝试设置请求目标private void button5_Click(object sender, EventArgs e) { List<string[]> rows = new List<string[]>(); int[] indexes = { 0, 1, 3, 5, 6, 7, 8, 9 }; using (var reader = new StreamReader(@"sourcedata.data")) { using (StreamWriter writetext = new StreamWriter("result.data")) { while (!reader.EndOfStream) { var line = reader.ReadLine(); if (line.IndexOf(',') == -1) continue; string[] values = line.Split(','); string[] row = new string[indexes.Length]; int insertIndex = 0; for (int i = 0; i < values.Length; i++) { string val = values[i]; if (val.Trim() == "?") goto BREAK; if (indexes.Contains(i)) row[insertIndex++] = val; } rows.Add(row); writetext.WriteLine(String.Join(",", row)); BREAK:; } } } } name

我正在使用以下请求: PATCH / requests / {request_id}与addressend_address

end_nickname

它返回:204 No Content,所以期待没有错误。

然后,如果我得到最新的目的地详情:

{
  "end_latitude": -29.951063378432128,
  "end_longitude": -90.07152712622717,
  "end_nickname": "Tristan Testing",
  "end_address": "Tristan Testing"
}

目标坐标更新正常,但昵称和地址未在任何地方设置。

我该如何解决这个问题?感谢。

1 个答案:

答案 0 :(得分:1)

结束此问题仅适用于沙箱,如nameaddress pickup destination public void ConfigureServices(IServiceCollection services) { SetCorsPolicy(services); services.AddMvc(); services.AddAuthentication(o => { o.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; o.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; }); SetAuthorisationPolicy(services); services.AddAuthorization(options => { options.DefaultPolicy = new AuthorizationPolicyBuilder(JwtBearerDefaults.AuthenticationScheme).RequireAuthenticatedUser().Build(); options.AddPolicy("Viewer3AuthPolicy", policy => policy.RequireClaim(Constants.AuthPolicyClaimsName, Constants.AuthPolicyClaimsValue)); }); } 未公开在沙盒上,根据优步API文档。< / p>