做一个简单的查询app(学校作业),比如查天气,网上搜了api接口,想使用百度提供的,
api介绍网址"http://apistore.baidu.com/apiworks/servicedetail/478.html",按要求注册取得了key;之前按照搜的教程学习了volley: "http://blog.csdn.net/guolin_blog/article/details/17482095",想使用JsonObjectRequest实现需求,但不知怎么使用volley实现百度带key的api请求,急!
Baidu Weather API requires the key to be put in the header of the request. I think your question is mainly about how to set the header. To set the header in volley, you need to override the getHeaders method of Request. The following is a simple example of getting the weather in Beijing.