From 62ad3fcd64caf0a96ec0d5027070f71a32e7568f Mon Sep 17 00:00:00 2001 From: Bawn Date: Wed, 17 Feb 2016 13:14:46 +0800 Subject: [PATCH] Update README.md --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 52e90ac..97d8578 100644 --- a/README.md +++ b/README.md @@ -283,6 +283,23 @@ MultiImageUploadApi *multiImageUploadApi = [[MultiImageUploadApi alloc] init]; __注意,不应该调用`self.responseJSONObject`作为处理数据,请使用`responseObject`来处理__,当实现这个协议方法后,使用 `api1.responseJSONObject` 获取数据时,返回将是 `count` 的值。 +### 添加 header + +只需要实现`- (NSDictionary *)requestHeaderValue`方法即可,比如 + +``` +- (NSDictionary *)requestHeaderValue{ + return @{@"Accept" : @"application/json"}; +} +``` +或者添加多个header +``` +- (NSDictionary *)requestHeaderValue{ + return @{@"Accept" : @"application/json", @"Accept" : @"application/json; charset=utf-8" : @"Content-Type"}; +} +``` + + ### 关于HUD 如何显示 "正在加载"的 HUD,请参考Demo中的 `LCRequestAccessory` 类