On Aug 9, 2011, at 7:44 AM, Amy Gibbs wrote:

> NSURL *uploadURL = [[NSURL alloc] initWithString:escapedUrl];
> NSMutableURLRequest* post = [NSMutableURLRequest requestWithURL: uploadURL];

If you want to upload anything, you want to send a PUT or POST request, but the 
default is a GET; sou need to set the HTTPMethod property. You also need to 
provide the data you want to upload, by setting the HTTPBody property.

> //NSURLConnection *connect = [NSURLConnection initWithRequest:post  
> delegate:self startImmediately:@"YES”];

As Thomas said, the last parameter is a boolean. The compiler gave you an error 
message about the type being wrong for that parameter (and depending on which 
compiler, told you that it expected a boolean. That should have been a clue not 
to put an NSString there.

Also, this is going to send the request asynchronously. That means you’ll need 
to set a delegate, and implement the necessary delegate methods, otherwise you 
won’t get any information on the progress of the operation.

Have you read the Apple overview docs on using NSURLConnection? They describe 
all this in detail including plenty of examples.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to