Commit graph

70 commits

Author SHA1 Message Date
Mattt Thompson
71ebcfff8b Minor refactoring to query string parameter functions in AFHTTPClient 2012-03-19 14:36:22 -04:00
Mattt Thompson
acd6e49294 [Issue #243] Fixing AFQueryStringFromParametersWithEncoding to encode nested array values correctly 2012-03-19 12:44:06 -04:00
Josh Chung
320f1ae114 added '&' between parameters in query string 2012-03-10 17:03:29 +09:00
Mattt Thompson
3c33b744f7 Minor code formatting 2012-03-09 14:08:24 -08:00
Mathieu Hausherr
bc7d320ee9 Multi level query parameters support for Multipart and Formencoded requests
Generate keys like 'key1[key2][][key3]'

Solve this problem
http://stackoverflow.com/questions/9605269/afhttpclient-invalid-tokens-in-dictionary-when-using-afformurlparameterencoding
2012-03-07 22:50:25 +01:00
Mattt Thompson
d2b02c3f17 Merge branch 'master' of github.com:AFNetworking/AFNetworking 2012-03-01 09:09:21 -08:00
Mattt Thompson
cac44aeb34 Skip non-AFHTTPRequestOperations in AFHTTPClient -cancelAllHTTPOperationsWithMethod 2012-03-01 09:09:17 -08:00
Mattt Thompson
4f31148101 Adding AFHTTPClient -patchPath: convenience method 2012-02-28 18:18:08 -08:00
Patrick Hernandez
cc2115e469 Made progressBlock call back to the main queue by default. 2012-02-28 17:12:10 -06:00
Patrick Hernandez
0fc6f980b9 A fix for batch enqueue completion block returning on background thread 2012-02-28 16:39:25 -06:00
Mattt Thompson
ad27bd0397 [Issue #209] Adding conditional in AFURLEncodedStringFromStringWithEncoding to correctly handle cases where '%' is passed in literally, and not interpreted as an escape sequence, which would have previously caused the subsequent string to be nil. 2012-02-20 19:31:55 -08:00
Mattt Thompson
4266dc60d1 Adding notifications for network reachability changes to AFHTTPClient 2012-02-01 11:27:57 -08:00
C. Bess
fe56222f5c Updated reachability flags. 2012-01-28 14:13:52 -06:00
C. Bess
3e4725bb3e Improved reachability check, detects severed internet connections. 2012-01-28 13:59:40 -06:00
Mattt Thompson
dfa6e97ad3 Merge branch 'feature-batched-operations' into experimental-0.9
Conflicts:
	AFNetworking/AFHTTPClient.m
2012-01-23 08:44:59 -08:00
Mattt Thompson
e334407891 Adding -description to AFHTTPClient 2012-01-23 08:41:55 -08:00
Mattt Thompson
0c25bcee82 Merge branch 'experimental-reachability' into experimental-0.9
Conflicts:
	AFNetworking/AFHTTPClient.m
2012-01-19 17:29:44 -08:00
Mattt Thompson
1ab2eed8c8 Adding #ifdef macros to conditionally compile reachability features only when the SystemConfiguration is available 2012-01-19 17:26:12 -08:00
Mattt Thompson
735d86a79b [Issue #161] [Issue #167] Replacing AFHTTPClient -cancelHTTPOperationsWithMethod:andURL: with -cancelAllHTTPOperationsWithMethod:path 2012-01-19 16:42:12 -08:00
Mattt Thompson
71bb48fd16 Adding documentation for array formatting behavior for AFQueryStringFromParametersWithEncoding
Minor refactoring
2012-01-18 17:57:26 -08:00
Mattt Thompson
7d656c2cbe Merge branch 'BNT_FormatQueryArrayParams' of https://github.com/BraveNewTalent/AFNetworking into BraveNewTalent-BNT_FormatQueryArrayParams 2012-01-18 17:36:37 -08:00
Mattt Thompson
54194a3cb6 [Issue #138] Adding double CRLF to multipart form final boundary
Minor refactoring of AFHTTPClient
2012-01-18 16:51:58 -08:00
Mattt Thompson
eb20980e86 Removing exception caused by multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock: is called with certain HTTP methods. Although message bodies for methods like HEAD, GET, and DELETE are traditionally ignored, there is nothing in the HTTP or multipart specs that explicitly forbid the use of multipart for a particular HTTP method. 2012-01-18 15:53:53 -08:00
Mattt Thompson
635b809020 Renaming 'class' variable to fix errors during compilation caused by some build settings (Thanks, Charlie Williams) 2012-01-18 15:31:09 -08:00
Mattt Thompson
8c2304cdfe [Issue #158] [Issue #163] Fixing error check in appendPartWithFileURL:name:error:. Looking at the documentation for NSURLConnection +sendSynchronousRequest:returningResponse:error:, we don't really need to check error to do the right thing. Therefore, we can get away with checking data and response, and leaving the inclusion of the specified **error as an optional exercise to the user 2012-01-16 14:32:44 -08:00
Mattt Thompson
ae48276092 [Issue #173] Fix data length issues in AFBase64EncodedStringFromString 2012-01-16 11:49:30 -08:00
Mattt Thompson
c713179420 Replacing AFNetworkReachabilityStatus type with BOOL 2012-01-10 13:17:27 -08:00
Mattt Thompson
95442be7b3 Initial implementation of network reachability callbacks 2012-01-10 12:20:30 -08:00
Michael Parker
2183dbbbcc "Content-disposition" should be "form-data" for a single file.
The "Content-disposition" should only be "file" if one of multiple files in a subpart. See the end of http://www.w3.org/TR/html4/interact/forms.html, section 17.13.4, for details. AFNetworking does not currently support creation of subparts where "file" should be used.

This fixes Tornado from failing to parse our file upload.
2012-01-06 21:24:45 -08:00
Mattt Thompson
2f2ee796ed Initial implementation of batched request operations 2011-12-17 23:49:51 -06:00
RayMorgan
1561f0392b Fix issue with multipart form boundaries.
The first boundary should not have a preceeding newline. This causes
some multipart parsers to miss the inital boundary.

An example of a parser facing this issue is node-formidable by felixge.
2011-11-29 14:16:48 -08:00
Dan Thorpe
0da3ec89d2 Modifies the query paramter function to correctly handle argument arrays. Now it adds the key[]=value1&key[]=value2 instead of key=(value1,value2) which isn't compatible with most HTTP servers. 2011-11-17 15:09:21 +00:00
Mattt Thompson
f801bc453c Fixing memory leak by adding missing autorelease (Thanks, Zac Bowling) 2011-11-10 11:57:32 -06:00
Mattt Thompson
648c650ae7 Changing return type of appendPartWithFileURL:name:error: to BOOL, according to Apple guidelines for methods that accept an NSError** parameter (Thanks, Zac Bowling)
Fixing issue with potential NULL dereference in setting error pointer
2011-11-10 11:56:58 -06:00
Mattt Thompson
b7d06b1fb7 Exposing AFURLEncodedStringFromStringWithEncoding and AFQueryStringFromParametersWithEncoding functions 2011-11-09 11:43:02 -06:00
Mattt Thompson
e08f236146 Reverting to NSURL +URLWithString:relativeToURL for building urls from paths
Documenting interactions of relative path parameters with baseURL
2011-11-09 10:51:33 -06:00
Mattt Thompson
9a91afe3e2 [Issue #98] Adding AFHTTPClient -appendPartWithFileURL:name:error:
Changing -appendPartWithFileData:mimeType:name: to -appendPartWithFileData:name:fileName:mimeType:
2011-11-07 12:16:42 -06:00
Mattt Thompson
afbd799e3b Replacing AFHTTPClient -enqueueHTTPRequestOperationWithRequest:... with -HTTPRequestOperationWithRequest:..., thereby decoupling the automatic HTTP operation creation from enqueuing them 2011-11-07 11:43:19 -06:00
Mattt Thompson
1fbe7846dd Merge branch 'experimental-json-agnosticism' into experimental-0.8 2011-11-07 11:21:55 -06:00
Mattt Thompson
200512c7b3 Merge branch 'experimental-http-client-callback-refactoring' into experimental-0.8 2011-11-07 11:20:15 -06:00
Mattt Thompson
eb79d53519 Return baseURL if path is nil in AFURLWithPathRelativeToURL 2011-11-02 12:00:53 -05:00
Scott Raymond
e2f5f86146 replace custom base-URL method with standard NSURL one 2011-11-01 15:42:33 -05:00
Mattt Thompson
dcf629f4a0 Changing parameter encoding to AFFormURLParameterEncoding by default, as per the documentation 2011-10-31 11:15:43 -05:00
Mattt Thompson
30ea7353d4 Refactoring success and failure callbacks for HTTP request operations and client, to add more information and make everything more consistent
Removing AFHTTPClient protocol
2011-10-24 13:08:58 -05:00
Mattt Thompson
283d9cffea Initial implementation of decoupling specific JSON libraries from AFNetworking, in favor of being able to specify which one to use 2011-10-24 10:49:25 -05:00
Mattt Thompson
3040aafee9 [Issue #72] More fixes to construction of URL from relative path, preventing scheme from incorrectly changing :// to :/ 2011-10-17 14:35:56 -05:00
Mattt Thompson
68ef25cb7c [Issue #72] Fixing construction of URL from path relative to base URL, where trailing slash is removed 2011-10-13 14:32:17 -05:00
Mattt Thompson
b8ca3496f8 Adding -unregisterHTTPOperationClass to AFHTTPClient
Removing 'Accept: applciation/json' default header from AFHTTPClient

Revising documentation for AFHTTPClient
2011-10-12 10:41:59 -05:00
Mattt Thompson
e7f799484a Adding Mac user agent to AFHTTPClient. Thanks to @Sutto (Darcy Laycock) 2011-10-11 16:55:14 -05:00
Mattt Thompson
e46b9e620b Conditionally adding default user agent header 2011-10-11 12:26:34 -05:00