Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #268 from ikarius/master

Patched issue #263 (if needed)
  • Loading branch information...
commit 4282568eec0b487a98e312ce49b523350ffa4a6b 2 parents c27b8f5 + 5e7e106
@greenisus greenisus authored
View
1  Classes/ASIFormDataRequest.m
@@ -49,6 +49,7 @@ - (id)initWithURL:(NSURL *)newURL
self = [super initWithURL:newURL];
[self setPostFormat:ASIURLEncodedPostFormat];
[self setStringEncoding:NSUTF8StringEncoding];
+ [self setRequestMethod:@"POST"];
return self;
}
View
2  Classes/Tests/ASIFormDataRequestTests.h
@@ -12,6 +12,7 @@
float progress;
}
+- (void)testDefaultMethod;
- (void)testPostWithFileUpload;
- (void)testEmptyData;
- (void)testSubclass;
@@ -19,4 +20,5 @@
- (void)testCharset;
- (void)testPUT;
- (void)testCopy;
+
@end
View
8 Classes/Tests/ASIFormDataRequestTests.m
@@ -17,6 +17,14 @@ @implementation ASIFormDataRequestSubclass;
@implementation ASIFormDataRequestTests
+
+-(void)testDefaultMethod
+{
+ ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:@"http://wedontcare.com"]] autorelease];
+
+ GHAssertTrue([[request requestMethod] isEqualToString:@"POST"], @"Default request method should be POST");
+}
+
- (void)testAddNilKeysAndValues
{
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/empty-post-value"]];
Please sign in to comment.
Something went wrong with that request. Please try again.