¿Cómo hago para replicar esto en Objective-CObjetivo-c autenticación básica HTTP
curl -u [email protected]:mypassword http://foo.lighthouseapp.com/projects.xml
He estado jugando con la biblioteca ASIHTTPRequest pero parece que no puede entenderlo,
obviamente enviar mi solicitud al igual que devuelve un error de autenticación:
-(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);
}
}
Esto es probablemente muy sencilla me estoy perdiendo algo muy importante
Gracias realmente me ayudó – mohitum