Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 09-02-2010, 07:48 AM   #2 (permalink)
DaTa
Registered Member
 
Join Date: Sep 2010
Posts: 4
DaTa is on a distinguished road
Default

It will be something like this:

Code:
        NSURL* url = [NSURL URLWithString:@"http://www.renren.com/PLogin.do"];
	ASIHTTPRequest* request = [ASIFormDataRequest requestWithURL: url];
	[request setPostValue: @"user account email" forKey:@"email"];
	[request setPostValue: @"user account password" forKey:@"password"];
	[request setPostValue: @"http://www.renren.com/Home.do" forKey:@"origURL"];
	[request setPostValue: @"renren.com" forKey:@"domain"];

	[request setDelegate: self];
	[request startAsynchronous];
then in your delegate class(in my code I set it up to self) you have to implement some methods from ASIHTTPRequestDelegate protocol:
Code:
- (void)requestStarted:(ASIHTTPRequest *)request;
- (void)requestReceivedResponseHeaders:(ASIHTTPRequest *)request;
- (void)requestFinished:(ASIHTTPRequest *)request;
- (void)requestFailed:(ASIHTTPRequest *)request;

- (void)request:(ASIHTTPRequest *)request didReceiveData:(NSData *)data;

- (void)authenticationNeededForRequest:(ASIHTTPRequest *)request;
- (void)proxyAuthenticationNeededForRequest:(ASIHTTPRequest *)request;
DaTa is offline   Reply With Quote
 

» Advertisements
» Online Users: 382
14 members and 368 guests
Absentia, antonwilliams, breennorah, Domele, dre, HemiMG, heshiming, ipodphone, KaliJen00, linkmx, Matl43Owa, mjnafjke, raymng, sathiamoorthy
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,579
Threads: 94,082
Posts: 402,769
Top Poster: BrianSlick (7,990)
Welcome to our newest member, breennorah
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:37 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.