35 - (NSDictionary *)defaultHeaders
37 return [NSDictionary dictionary];
40 - (NSDictionary *)buildRequestHeaderFieldsUsingHeaders:(NSDictionary *)headers forHTTPMethod:(NSString *)HTTPMethod
42 NSMutableDictionary *headerFields = [NSMutableDictionary dictionaryWithDictionary:[
self defaultHeaders]];
46 [headerFields addEntriesFromDictionary:headers];
48 return [headerFields copy];
52 #pragma mark Format Header for Method
55 - (NSDictionary *)HTTPFormatHeaderForHTTPMethod:(NSString *)HTTPMethod
57 NSString *
const HTTPMethods[] =
65 NSString *
const headerNames[] =
80 for (index = 0; index <
ARDimOf(HTTPMethods); index++)
82 if ([HTTPMethod isEqualToString:HTTPMethods[index]])
87 NSDictionary *formatHeader;
88 if (index <
ARDimOf(HTTPMethods))
90 formatHeader = [NSDictionary dictionaryWithObject:[[
self format] MIMEType] forKey:headerNames[index]];
94 formatHeader = [NSDictionary dictionary];