我的 RESTful 网络服务(Rails)上有方法“getBuses”。该方法需要以 JSON 格式返回我的总线列表。但是,当我发送“/getBuses.json”请求时,我需要发送
params = [NSDictionary 
dictionaryWithObjectsAndKeys: @"2011-08-16", @"datum", @"TRUE", 
@"fromSerbia", nil]; 
我发布参数是因为我需要过滤响应(仅针对特定日期的特定游览)。然后,我期待这样的回应:
{ 
  "buses" : [ { 
    "bus_number" : "1", 
    "created_at" : "2011-08-15T23:07:52Z", 
    "id" : 1, 
    "lat" : 44.815, 
    "long" : 20.4665, 
    "model" : "Setra", 
    "registar_number" : "123456", 
    "seats" : 50, 
    "tour_id" : 1, 
    "updated_at" : "2011-08-15T23:07:52Z" 
  }, { 
    "bus_number" : "2", 
    "created_at" : "2011-08-15T23:07:52Z", 
    "id" : 2, 
    "lat" : 44.812, 
    "long" : 20.465, 
    "model" : "Mercedes", 
    "registar_number" : "2234", 
    "seats" : 60, 
    "tour_id" : 1, 
    "updated_at" : "2011-08-15T23:07:52Z" 
  } ] 
} 
我只需要带有 Bus 对象的 NSArray。 你能给我代码示例如何提出这个请求并使用 RestKit 进行对象映射吗?