Ben Copsey

ASIFormDataRequest: setPostValue:forKey now takes any object that conforms to the NSObject protocol

Thanks to EgoAleSum for this suggestion!
... ... @@ -21,7 +21,7 @@
#pragma mark setup request
// Add a POST variable to the request
- (void)setPostValue:(id)value forKey:(NSString *)key;
- (void)setPostValue:(id <NSObject>)value forKey:(NSString *)key;
// Add the contents of a local file to the request
- (void)setFile:(NSString *)filePath forKey:(NSString *)key;
... ...
... ... @@ -30,12 +30,12 @@
#pragma mark setup request
- (void)setPostValue:(id)value forKey:(NSString *)key
- (void)setPostValue:(id <NSObject>)value forKey:(NSString *)key
{
if (!postData) {
postData = [[NSMutableDictionary alloc] init];
}
[postData setValue:value forKey:key];
[postData setValue:[value description] forKey:key];
[self setRequestMethod:@"POST"];
}
... ...
... ... @@ -3,7 +3,7 @@
// asi-http-request
//
// Created by Ben Copsey on 09/07/2008.
// Copyright __MyCompanyName__ 2008. All rights reserved.
// Copyright 2008 All-Seeing Interactive. All rights reserved.
//
#import <Cocoa/Cocoa.h>
... ...
... ... @@ -3,7 +3,7 @@
// asi-http-request
//
// Created by Ben Copsey on 09/07/2008.
// Copyright __MyCompanyName__ 2008. All rights reserved.
// Copyright 2008 All-Seeing Interactive. All rights reserved.
//
#import <UIKit/UIKit.h>
... ...