In my application, i have a button wich calls an ASIHTTPRequest. The request goes fine and i receive an response string. But when the request finishes, it always goes to the method: requestFinished. And i also got a requestFailed method. But even when i give a wrong link, the request finsihes and never fails.. Why is this? This is my code:

```
-(void)fetchForm:(id)sender {

    NSURL *URL=[NSURL URLWithString:@"http://www.mydomain.nl/testGet.php"]; 
    ASIHTTPRequest *request = [[[ASIHTTPRequest alloc] initWithURL:URL] autorelease];
    [request setDelegate:self];
    [request setDidFailSelector:@selector(requestFailed:)];
    [request startAsynchronous];

}

-(void)requestFinished:(ASIHTTPRequest *)request {
    NSLog(@"Request Success!");
}

-(void)requestFailed:(ASIHTTPRequest *)request {
    NSLog(@"Request Failed!");
}

```

EDIT:

I read a little documentation on the ASIHTTPRequest website. And i came to the conclusion that i need to see for myself if there is an error code. i do this with:

```
int statusCode = [request responseStatusCode];

if (statusCode == 404) {
NSLog(@"Statuscode 404 has occured!");
}

```