CURLHandle trouble
CURLHandle trouble
- Subject: CURLHandle trouble
- From: Michael Becker <email@hidden>
- Date: Tue, 13 Jan 2004 21:07:26 +0100
Hi!
I chose CURLHandle to be my framework for dealing with HTTP POST
requests. But I instantly ran into a problem I just cannot figure out
myself:
This is my very basic code (Trying to perform a basic HTTP POST):
NSDictionary *dict = [ NSDictionary dictionaryWithObject:@"Value"
forKey:@"Key"];
NSURL *url = [NSURL URLWithString:@"
http://localhost/myPOST.php"];
CURLHandle *mURLHandle = (CURLHandle *)[url URLHandleUsingCache:NO];
NSLog(@"%@", mURLHandle);
[(CURLHandle*)mURLHandle setPostDictionary:dict];
[mURLHandle prepareAndPerformCurl];
The application compiles nicely without error nor warnings. However,
when I invoke my post-method, I get following error:
2004-01-13 18:56:19.911 SNCPUpload[824] *** -[NSHTTPURLHandle
setPostDictionary:]: selector not recognized
2004-01-13 18:56:19.918 SNCPUpload[824] *** -[NSHTTPURLHandle
setPostDictionary:]: selector not recognized
The NSLog() outputs:
2004-01-13 18:56:19.910 SNCPUpload[824] <NSHTTPURLHandle: 0x359180>
Why is my mURLHandle not a (CURLHandle*)? I imported both CURLHandle.h
and CURLHandle+extras.h ...
Bye,
Michael
PS: I haven't found this anywhere in the CURLHandle documentation, but
can my "object" in the dictionary be anything? I need to post a form
containing strings, files and even NSImages... is this possible?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.