• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CURLHandle trouble
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: CURLHandle trouble
      • From: Don Murta <email@hidden>
  • Prev by Date: Re: iChat "Sort by..." animation
  • Next by Date: Recent Documents / Trash Issue ...
  • Previous by thread: Re: Setting a documents file type during save as=8 5
  • Next by thread: Re: CURLHandle trouble
  • Index(es):
    • Date
    • Thread