Bunu nesnel-cAmaç-c HTTP Temel kimlik doğrulaması
curl -u [email protected]:mypassword http://foo.lighthouseapp.com/projects.xml
ile çoğaltmaya ne derslerdim ASIHTTPRequest kütüphanesiyle uğraşıyorum ama bunu anlayamıyorum,
açıkçası isteğimi gönderiyor gibiyim bir kimlik doğrulama hatası:
-(void)submit:(id)sender {
NSURL *url = [NSURL URLWithString:@"http://ldn.lighthouseapp.com/projects/63254-londonist-20/tickets.xml"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request startSynchronous];
NSError *error = [request error];
if (!error) {
NSString *response = [request responseString];
NSLog(@"response:%@",response);
} else {
NSLog(@"error:%@",error);
}
}
Bu çok basittir, sadece oldukça büyük bir şey eksik
Teşekkürler, bana gerçekten yardımcı oldu – mohitum